When is it a good idea to make a root directory its own partition?

I wanted to ask a separate question following my thread on upgrading my installation from BIOS to UEFI. I learned about the need to create an ESP partition, which now requires re-partitioning my root drive. This brings into question something I didn’t give much thought to: When is it generally a good idea to put certain directories into separate partitions? Note that I don’t use BTRFS for root so I’m not curious about subvolumes.

I ask this because a lot of people still keep their /boot directory as a separate partition, which I’m undecided on doing as BTRFS might be a better place to store just GRUB2 and the Kernel VM’s. Further more some seem to also put common directories into their own partitions, such as /var /usr /lib and others. I’m not going for such drastic changes on my existing installation, but is there generally any advantage to putting various things on their own partitions?

Good question. Not easy to answer.

Over time splitting the one and only directory tree into different file systems has had many reasons and many pros and cons. Many of them still hold true, some even on a simple home system (see the former default to create a separate /home, which is now replace by a Btrfs subvolume for /home).

Arguments:

  • In early Unix systems, disks were small, thus even the “system directories” (with their contents) has to be split over several disks to get them on board at all. Things like splitting I/O over different disk might be involved here also.
  • Having parts on a different type of storage, like a database on a RAID, or encryption, or other hardware (SSD), etc.
  • Being forced to a separate /boot, because the boot loader software (LILO, Grub) did/does not support the file system type of /.
  • Problems like “file system full” by e.g. an over creative user can be restricted to a file system dedicated to that user (e.g. /home/user), then others are not involved when (s)he did it again.
  • OTOH having a full file system while there is ample space on another one (maybe even neighbouring) is frustrating because changing a once chosen set-up is not easy and in almost any case needs down time.

I have no doubt others can offer more arguments to have, or not have a separate file system for something under certainm circumstances.

So it is in the end up to you, the system manager, to decide what to do in what case. To watch if your expectations are what you see in reality and adapt your policy when needed.

A note: I avoided the word partition above, because that is not what this is about. It is about file systems. But, as you can read in the above, it is stronly connected to the containers/volumes used in the different cases: whole disks, disk partitions, Logical Volumes, etc.

Hi
All depends on your requirements for the system, for example databases etc shouldn’t be on btrfs, for example here is my setup for my SuMA instance;


NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT     FSTYPE
sda      8:0    0 698.7G  0 disk                
├─sda1   8:1    0   500M  0 part /boot          ext3
├─sda2   8:2    0     1K  0 part                
├─sda5   8:5    0   100G  0 part /              btrfs
├─sda6   8:6    0     6G  0 part [SWAP]         swap
├─sda7   8:7    0   100G  0 part /var/lib/pgsql xfs
└─sda8   8:8    0 492.1G  0 part /var/spacewalk xfs

On this system I use KVM so the directory /var/lib/libvirt is on xfs.

Add: to make sure it is located in the first 528MB/8GB/whatever BIOS limit of the day was in effect. As close to the beginning of disk as possible.

A system with many partitions can mean extra maintenance, keeping track of what is where.

But,
Traditionally partitioning can provide benefits and are usually based on personal decisions, not always hard and fast rules…

  • Separate apps from personal data.
  • files with different activity, can mean less fragmentation and different degragmentation and file maintenance schedules
  • If on different disks and disk arrays, then different performance

From the above,
You can further break down into different types of applications, eg LOB “server” type apps vs personal apps
Personal organization, maintenance of different data

The basic idea is that partitioning separates and isolates, providing a better barrier between apps and data files than mere directories… If you recognize a benefit to separating one thing from another then it’s a candidate for placing in a different partition.

HTH,
TSU

Thanks for the input. I believe I passingly read something about how using multiple partitions might reduce the size of some partition tables which could improve performance, though that doesn’t make a lot of sense since you still need to reference the same files in all cases.

For an ordinary magnetic HDDs: more speed with more disks involved due to parallelized workload.
Especially when dealing with a swap. It also works well in Windows OS.
No fragmentation with a separate /swap.

Using NVME SSD disks with a legacy booting.