1

When I install a graphical distro for personal purpose I usually separate /boot and /home.

When I install a server I stick to /boot and / only, and depending on the project I may consider some other on demand, as I have mentioned here with /var/log and /var/lib/docker.

Based on the premise I am talking about a Linux server it seems there is a tendency of recklessly separating every root directory into partitions I don't see why!

@Doug O'Neal have mentioned it is on multiple best-practices documents (e.g, CIS Benchmark) that mandate separating /var, /home, /usr, etc, into different file systems.

I have read this article which gives good reasons for separating partitions but doesn't seem to be overdone for every directory.

This other article and here as well mention the per directory partitioning, but does not give any reason, just do that for security sake, blindly trusting them!

The fact you could configure different flags on mounting as nodev, nosuid or even noexec doesn't seem such crucial to me as if the user is not sudoer simple denying write access would be enough, and if it is sudoer these flags would not prevent any damage.

The fact you could backup them separated doesn't pay the burden. and the fact you could clear them separated you could simple remove the directory.

The fact you could have badblocks on some of them doesn't make me feel any relieved, such as the badblocks are given by sector, the files would be damaged with or without partitions.

The only fact I can think could be a little good would be if the partitions are on separeted disks and one of them failed to be loaded or had the partition table sector damaged, but depending on the case you wouldn't be able to boot the system anyway, with or without several spread partitions.

Thinking about this last possibility, in order to recover the disk wouldn't make any difference to have one or several partition, you can run testdisk or ddrescue the image in any case will result the same.

Anyone could give some more reasons why will several partition separation without taking into account which suit the project or not would be of any good? What is those reasons so called for best-practices?

closed as primarily opinion-based by DopeGhoti, steve, Christopher, Jeff Schaller, echox Jun 20 '18 at 19:09

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Please, do not close this question, it is not opinion-based as there is "multiple best-practices documents" recommendations about the subject. – Tiago Pimenta Jun 20 '18 at 19:04
  • Please, reopen the question, how it could be opinion-based if there is several articles discussing the relevance of having these structure, which I am asking for what security reasons it implies – Tiago Pimenta Jun 20 '18 at 19:15
  • 1
    Christopher's comment about preventing runaway disk usage is correct, but also space and hardware allocations in general are going to be dependent on what tasks that server/workstation is doing. A mail server's disk use by directory is different from a web server is different from a db server is different from a workstation/desktop is different from a laptop. – ivanivan Jun 20 '18 at 21:07
  • I think, you see that perfectly well. Partitioning is an ancient thing from a low-flexibility era of the computing. There is no reason to have multiple partitions, except if you have significantly different disks. Consider, for example, a system having a main boot/root partition and a large background storage on a NAS. It might be a reason to have TWO partitions and no more. Or, if you are running a virtual machine, then it is useful to make its virtual disk a partition on your drive (because it is much better as to have large it in large comperres files like vmware does). – peterh Jun 20 '18 at 22:42
0

The fact that when looking in eight places for advice on this and getting a dozen answers means that the answer to the question of how to divide your partitions is both highly subjective and highly situational.

Personally; I don't usually suggest breaking things out too much beyond /, /boot, and /home -- the latter mainly so that you can just mount /home on any number of systems to bring your personal cruft along if you're switching between various Linux distributions.

  • I separate /boot due to UEFI issues, without that it wouldn't be required, and I separate /home for rescue or raw installation, but it could be done by backup even without separated partition as well. The idea of having several distros would be the uniq good reason for personal purposes, but in that case I am talking about servers, so I still do not know why there is this tendency. – Tiago Pimenta Jun 20 '18 at 18:29
  • I recently had a 32 gigabyte vim cache file in my /root directory (apparently when I'd edited a /srv/http/styles.css file with sudo vim). I couldn't update until I figured it out (with the help of U.SE). So I can definitely see the point of partitioning /home and /root to prevent caching from messing everything up as well. (I wish now I'd partitioned /root away from /. – malan Jun 20 '18 at 18:57

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