Why put things other than /home to a separate partition?
- Minimizing loss: If
/usr
is on a separate partition, a damaged/usr
does not mean that you cannot recover/etc
. - Security:
/
cannot be always ro (/root
may need to be rw etc.) but/usr
can. It can be used to make ro as much as possible. - Using different FS: I may want to use a different system for
/tmp
(not reliable but fast for many files) and/home
(has to be reliable). Similary/var
contains data while/usr
does not so/usr
stability can be sacrifice but not so much as/tmp
. - Duration of fsck: Smaller partitions mean that checking one is faster.
- Mentioned filling up of partions, although other method is quotas.
A separate /usr
can be useful if you have several machines sharing the same OS. They can share a single central /usr
instead of duplicating it on every system. /usr
can be mounted read-only.
/var
and /tmp
can be filled up by user programs or daemons. Therefore it can be safe to have these in separate partitions that would prevent /
, the root partition, to be 100% full, and would hit your system badly. To avoid having two distinct partitions for these, it is not uncommon to see /tmp
being a symlink to /var/tmp
.
Because ordinary users can cause things to be written to /var
and /tmp
, and thus potentially cause problems for the whole system. This way user processes can fill up /var
and /tmp
, but not the root fs. A separate /usr
is useful for /usr
over NFS, or other remote fs.
(I hope this is clear, I haven't had any coffee yet)