3

The Filesystem Hierarchy Standard (FHS) is the formal codification for root file tree on Linux installations, as inherited from earlier iterations of Unix and POSIX, and subsequently adapted. It standardizes the exact uses of the familiar /home, /etc, /usr, /var, and so on, from various historic differences of convention, and resolves where application-specific and site-specific file names may be added, or not.

Basic Linux installations historically have placed the entire tree on a single file system, though some variations have utilized a separate partition for /home, presumably to facilitate backup and migration.

More recently, Btrfs has gained increasing adoption, which allows a single partition to host various subvolumes. Subvolumes are appealing because they may be captured in snapshots, and require no pre-allocation of space.

The mapping of subvolumes to nodes on the FSH appears to vary widely. Sensible standards and policies respecting such matters are important, for supporting optimal management of files on the system with respect to snaphots and related concerns.

Following are some observations:

  • Debian appears to place the entire tree on a single subvolume beneath root.
  • Ubuntu appears to allocate a subvolume for /home, and another for the remainder of the root tree.
  • Arch Linux appears to extend the separation adopted by Debian by placing /var/log and /var/cache each in a separate subvolume.
  • openSUSE has a single subvolume for /var, and one each for /home, /root, /usr/local, /opt, and /srv, as well as one for the remainder of the root tree, a further one for each installed grub architecture.

Have any standards emerged that have attempted to resolve the various design considerations, and to unify the approaches adopted by various operating systems? Has any agreement emerged concerning how to reconcile the functions of the various file tree nodes with policies concerning snapshots?

2
  • How can one recommend anything without knowing the application target, not even if we are talking about server, desktop or embedded?
    – Philippos
    Commented Nov 8, 2022 at 14:19
  • @Philippos, I don't know that a single solution cannot apply to all such cases, but at any rate, the question makes no such requirement. The question is "Have any standards emerged [applying either to all cases or specific cases]...?" As many distributions have variations for all kinds of targets, I am doubtful of any problem of the sort you suggest.
    – brainchild
    Commented Nov 8, 2022 at 14:37

2 Answers 2

0

No, such standards have not arisen.

0

FWIW the CIS security standard has clear points concerning what merits having its own filesystem. cisecurity.org/cis-benchmarks

@steve, I don't understand your comment in relation to the subject of the question

the CIS (or USG STIG) benchmarks insinuate a kind of standard in the guise of security for having separate partitions for /home or /var or /usr and some of the many other folders that are at the top level of the linux file system as described by your FHS link. The benchmark I am familiar with has dropped many folders over the past few benchmark versions and now call for just /home and /var and /var/log/audit on a separate partition otherwise it is a security finding :rolleyes:. Their discussion statement is only The use of separate file systems for different paths can protect the system from failures resulting from a file system becoming full or failing. I will leave it up to you as the reader to identify all the holes in this logic.

Having various directories mounted as a separate partition allows the admin the capability of mounting such partitions, as noexec and nosuid for example, or the use of quota-enabled file system, which can offer some security benefit but in general is admin organizational benefit. But there is no "standard" in doing such a thing, and when you mention Debian, Arch, OpenSUSE all do a different partition scheme... in my opinion they were influenced by things like CIS benchmarks and the "security" mentality and the whatever warm fuzzy that provides as a selling point.

"The Standard" should be at the linux admins recommendation for partition scheming as they see fit to meet their needs for the environment at hand. You could debate all day pro's and con's of what folders should and should not be on separate partitions, all for legitimate reasons, which is why a standard for this specific thing can't really happen.

I think this is a good question especially in regards to BTRFS; I would look into if BTRFS cares about partitions in regards to subvolumes & snapshots and its other capabilities (I suspect not but honestly can't tell you for sure).

1
  • I believe the subvolumes are primarily chosen for separation of content preserved in snapshots.
    – brainchild
    Commented Nov 8, 2022 at 19:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .