Which are the best file-systems/mount-configuration for each folder on GNU/linux?

1

One of the good points of Linux is that is easy to customize the partitioning scheme of the disk and put each directory (/home, /var, etc) in different partitions and/or different disk.

Then we can use different file system/configurations for each of them for make them better. Examples:

  • noatime is a mount option to not write access time on the files.
  • data=writeback is an option to lazy write metadata on new files.
  • ext3/4 has journaling that make the partition more secure in case of a crash.
  • bigger blocks make the partition waste more space, but make it faster to read and may become more fragmented. (not sure)

Then: What are the best filesystem/configurations for each directory?

Note: given the answer of Patches, will only discuss /, /home and /var only.

/var -> It's modified constantly, it write logs, cache, temporal, etc.
/home -> stores important files.
/ -> stores everything else (/etc and /usr should be here)

eloyesp

Posted 2011-04-10T23:32:47.413

Reputation: 403

Please, there is other posts about filesystems, but there are not specific about linux, directories. ----- Please don't answer things like this filesystem is the best of all. I'm trying to learn about priorities in Linux Hierarchy and adventages of filesistem, so introduce specific adventages. – eloyesp – 2011-04-10T23:37:50.560

Answers

0

You should not host /usr or /etc on seperate partitions. /etc on a seperate partition simply will not work on most systems without a lot of work. Having a seperate /usr on modern Linux machines will appear to work, but break a lot of functionality, as systemd author Lennart Poettering explains:

Most of the failures you will experience with /usr split off are graceful failures: they won't become directly visible, however certain features become unavailable due to these failures. Quite a number of programs these days hook themselves into the early boot process at various stages. A popular way to do this is for example via udev rules. The binaries called from these rules are sometimes located on /usr/bin, or link against libraries in /usr/lib, or use data files from /usr/share. If these rules fail udev will proceed with the next one, however later on applications will then not properly detect these udev devices or features of these devices. Here's a short, very in-comprehensive list of software we are aware of that currently is not able to provide the full set of functionality when /usr is split off: udev-pci-db/udev-usb-db and all rules depending on this (using the PCI/USB database in /usr/share), PulseAudio, NetworkManager, ModemManager, udisks, libatasmart, usb_modeswitch, gnome-color-manager, usbmuxd, ALSA, D-Bus, CUPS, Plymouth, the locale logic of most programs and a lot of other stuff.

/var and /home work just fine on their own partitions, and putting the latter on its own partition is highly reccomended.

Patches

Posted 2011-04-10T23:32:47.413

Reputation: 14 078