Multiple mountpoints on one partition?
You can always mount your third partition somewhere (like /mnt/combo
or something), and then bind-mount subdirectories from this mountpoint to the three designated directories.
In fstab
, this would look something like
UUID=... /mnt/combo auto defaults
/mnt/combo/usr /home none bind
/mnt/combo/var /var none bind
/mnt/combo/home /home none bind
Also consider this: /home
makes sense to live on a separate partition - even better, a separate drive, which can be somehow protected (raid, backups,...). /var
would make sense to be separate if you really have something personal in there (websites and such), otherwise it makes no difference. /usr
can definitely be part of /
, it makes no sense to have it separate because on a modern system, the distinction between /bin
and /usr/bin
is blurred and noone cares about it anymore, and segmenting a system only creates problems if one of the partitions somehow doesn't mount.
/tmp
should normally be ram-backed anyway (tmpfs
), unless you really are running out of RAM, and most distros do that by default unless you change it.
Big picture: separate /home
if you have to, the rest is just overhead - you probably have no reason to have different filesystem types or different permissions on any of these, and partitioning doesn't usually mean physical separation (same hard drive?).
Related videos on Youtube
cprn
Updated on September 18, 2022Comments
-
cprn over 1 year
Can I have separate
/
and/tmp
but/home
+/var
on one partition somehow?Separate
/tmp
is good because I can set it up with some quick unreliable filesystem. I often change distributions therefore separate/
is a blessing - quick re-install and I'm good as long as/home
and/var
are untouched.The problem is, I don't want to designate space for any of the last three - I want them to share available resources. I sometimes need more space in
/var
and I can see there's available space in/home
that I cannot use, sometimes it's the other way around. It's frustrating. Any ideas?-
frostschutz over 7 yearsYou don't separate
/
and/usr
anymore. You can't do reinstalls leaving/usr
untouched either (and/var
not completely). -
cprn over 7 yearsWhy? Any sources on that? What is a good practice regarding partitions separation then?
-
ilkkachu over 7 years@Cyprian, freedesktop.org/wiki/Software/systemd/separate-usr-is-broken (it's by the systemd folks but not directly related to it)
-
-
cprn over 7 yearsHow would that work during reinstall? Each time I reinstall it would write to
/home
,/usr
,/var
on root partition and afterwards I would manually "replace" mountpoints with/home
,/usr
and/var
from my/mnt/combo
? -
orion over 7 yearsYes, that would work, if that's what you want. But then, what does a reinstall even do? You usually want to keep configuration, so keeping
/etc/
is more important than the rest, and there isn't much outside/usr
anyway on a fresh install (/boot
and that's it). If you want the install to write to these partitions, you'll simply have to mount this before running installation. -
cprn over 7 yearsOkay, I'm marking this as a valid answer because it resolves my question... I have to re-think my idea of reinstall, though, but this is a separate issue. And no, I don't think I want to keep configs because I use reinstall as the last resort when I'm lost trying to fix whatever I broke and need a working system ASAP, default configs, default packages.
-
orion over 7 yearsIn that case, in my opinion, it's better to wipe clean the /usr too. Because package repositories change. Things get updated. Very likely, old applications wouldn't work with fresh install. I would strongly recommend to just have a list of packages you want... and write a script that would quickly install everything, always the same things - and maybe simulatenously fix the things you want personalized (hostname, network config,...). A simple shell script that does the full system install. Otherwise you'll spend hours debugging when compatibility breaks.