1

This question has surely been answered somewhere else but I'm having trouble finding it.

I'm in a situation where I'm moving my root file system from a Debian install off of a hardware RAID and onto an internal USB. I want to keep the partition small and relatively secure. The goal is to keep frequent read/writes off the root partition for stability reasons. I have prepped a RAID10 disk with a few different partitions, one for /home and I will put the rest of the movable directories on another partition and bind them in fstab.

The question I have is, what directories can/should I move out of the root partition and mount them with fstab?

I know /bin, /sbin, /etc, /boot(kinda), /dev, /mnt, and others can't/shouldn't be moved out of the root partition as they are required on boot and well, fstab to even function.

I've glanced at the FHS and saw a list of required directories but according to other answeres such as this here, /var, /tmp, /usr, and others can be moved and in some instances, reccomended.

Note: When I mention "move", I mean to say to keep the parent directory though move the contents.

  • /boot is usually a separate partition on Ubuntu and Ubuntu derivatives. /dev is a virtual filesystem. /mnt usually contains nothing. On Arch and Fedora, everything in /bin and /sbin has been moved to /usr, and that can be a separate partition as well. – muru Oct 27 at 5:14
1

Today, you have to adapt to SystemD; 90% of the traditional and complicated "rules" for partitioning are obsolete.

The usr-bin "split" problem is also "normalized", thanks to systemd: Poettering explains why it has "always been broken" to have /usr split off and have a "minimal" /bin; the initrd is that "minimal root". he says. (systemd/TheCaseForTheUsrMerge)

That means, /usr stays on root. This makes sense and is a simplification. You can still use a sub-mountpoint like /usr/local/...

/var is the first mountpoint to split off for IO reasons (perf./safety). It has e.g. log/journal.

/home: can be split off for logical reasons ("/usr"=system, "home"=data )

/opt and /srv can be split off for volume reasons. How they are used will depend on what is installed.

/tmp and /run are type-tmpfs-mounted - could of course be configured else, and then likely be split off.


How this translates to your setup (internal USB?) I can't say. But if you bother for RAID, then maybe you want one kind of RAID for /var, and another for "/" and or home. When you add RAID, you don't have a 1-to-1 mountpoint-to-disk mapping anymore. You can create virtual disks of different flavors: "normal" RAID01, extra fast for /var, extra safe for /home.

  • Wow, thank you! This gives me more of an idea where to start. As for more of an explination, I am rocking a HP server with an internal USB port that I will be moving my host OS to. But the USB drives I'm working with arn't server grade so I want to give them less reason to fail with constant IO. I did find this from the Debian docs which show /var, /tmp, and /home to be the most frequently moved. And you're right, I was looking at older docs which showed you "could" move /usr off but it's no longer reccomended. – BobserLuck Oct 27 at 21:21
  • Now I'm wondering, could there be issues if I simply stick /opt, /srv, /tmp, and /run in fstab to mount during boot without any other configuration? Or is there something else I'm missing? – BobserLuck Oct 27 at 21:24
  • You've got to take everything that Poettering says with a huge grain of salt. He's prone to stating his personal opinions and preferences as facts, regardless of whether he knows what he's talking about or not. Worse, he's prone to not only ignoring anything he doesn't need or use on his personal workstation, but refusing to acknowledge that anyone else might ever need or use something that he doesn't. And, worse even that that, he's prone to breaking anything he doesn't care about as long as what he needs kind of works, or to force others to adopt his personal preferences. – cas Oct 28 at 0:36
  • He will also say whatever he needs to say to justify whatever his current obsession is, even if it contradicts his previous statements. For example, he is clearly contemptuous and dismissive of any need for cross-platform compatibility with systemd - it's a big part of his justification for refusing to accept compatibility patches for freebsd and other operating systems. But with TheCaseForTheUsrMerge, suddenly compatibility with something that he claims solaris did 15 years ago is crucially important. – cas Oct 28 at 0:39
  • @cas I much agree. For me, his obsession is this "early userspace" (initrd) - looks like this is why 1) usr-split is broken 2) not necessary. "Today, you have to adapt to systemd..." does not mean "thanks to systemd you can...". Systemd is our punishment for not being able to find a standard system startup in Linux. For not being able to be independant of distros. – rastafile Oct 28 at 5:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.