Combined root, /var and /usr
Nate Lawson
nate at root.org
Tue Sep 13 11:06:21 PDT 2005
Greg 'groggy' Lehey wrote:
> I've been recommending and doing this for years. FWIW in the fourth
> edition of "The Complete FreeBSD" I recommended 4 to 6 GB; I'd now say
> that 8 to 10 is better. I also recommend a separate /var if you're
> doing important things with it. Here's what I have on my two main
> machines:
>
> === root at wantadilla (/dev/ttyp0) ~ 98 -> df
> Filesystem 1048576-blocks Used Avail Capacity Mounted on
> /dev/ad0s1a 9912 4211 4908 46% /
> /dev/ad0s3h 51895 41842 5902 88% /home
>
> === root at echunga (/dev/ttyp4) ~ 29 -> df
> Filesystem 1048576-blocks Used Avail Capacity Mounted on
> /dev/ad0s1a 14873 7985 5698 58% /
> /dev/ad0s1g 9916 3846 5276 42% /home
> /dev/ad2s1h 188356 106658 66629 62% /src
Large / means you have to wait for it to fsck before bg fsck can run on
other filesystems. On my crashbox (laptop), that is unacceptable.
/var on the same filesystem as / means that you're bound to have lots of
problems found via fsck that you may have to review manually when a busy
system crashes. With var separate from /, you can just blow it away
(fsck -y) and get back to work.
If you don't have a diskless server or livecd, having a separate / means
you can boot and rebuild a fs with fsdb. With a combined partition,
this is probabilistic.
If you start getting block errors on your hard drive, separate
partitions mean you can pull off the files still alive, remap bad
sectors, and newfs. Try that with one large /.
> In CFBSD IV I explain how / and /usr came to be: about 32 years ago,
> they had / on an RK03 (0.5 MB), so they *had* to put the rest of the
> system somewhere else. The fact that we still use a separate /usr has
> something to do with the reliability of the Seventh Edition file
> system
See above for examples still valid today.
> and something to do with not changing the way our grandfathers
> did things (writing "return (FOO)" instead of "return FOO" is
> another example).
I think that one is more about consistency. return () is a keyword
while exit() is a function. It's the same reason we don't write if().
--
Nate
More information about the cvs-src
mailing list