There's no point in multiple system filesystems any more
Over the years I've written a number of things about how I think
one should partition up your disk or disks for your system filesystems.
Three things have been constant in those successive updates; the
sizes of everything has kept growing, the amount I trust things
like software RAID and LVM has kept increasing, and the number of
separate filesystems has kept shrinking. Today I feel like writing
down my current views, which are really simple. To wit, I feel
there's no point in having more than /
, the root filesystem.
It's been some time since a separate
/var
or /usr
made sense or was even supported. I stubbornly
clung to a separate /boot
for a long time, but I don't see any
point to it any more, so I say make your life simpler by putting
it in the root filesystem too. As far as size goes, I like to give
the root filesystem 80 to 100 GB of disk space so that I have room
for crazy things like saving a copy of every RPM I've ever downloaded,
but in today's increasingly SSD-based environment you might want to be
more parsimonious. I suspect 50 to 60 GB will cover most everyone.
(If you have lots of disk space available for this purpose, make two identical-sized partitions and use the second as a backup root filesystem during major things like OS version upgrades. My experience with this is that having a backup root filesystem is very reassuring.)
I'm still a very strong proponent of mirrored system disks. While
I like LVM in general, I wouldn't put /
into an LVM volume; I
prefer to reserve LVM volumes entirely for my own data, so I can
do crazy things like convert to ZFS without
affecting the root filesystem (here's my disk layout for ZFS). This means I use good old fashioned software
RAID mirrors on actual partitions (GPT partitions these days). Modern Linux installers make this relatively
simple to set up.
As far as the filesystem type for /
goes, use something well
tested and solid (and with solid GRUB boot support, since /boot
is part of it). Today that means ext3 or ext4. If you want to flirt
with Btrfs or ZFS on Linux, well, go for it, but you're probably
going to need a separate /boot
and have all sorts of annoyances
(and you're probably reading this entry mostly for amusement value).
My view is that basically every directory that your OS distribution
creates is best left alone and unused, and thus should be left on
the root filesystem. I'm willing to put a small amount of things
in /opt
if they insist, but I don't have my own home directory
and data in /home
; I have a separate directory hierarchy (and
separate filesystem) for my actual home directory. The same thing
is true for website files, database storage, and so on; I don't
accept the stock defaults of various places in /var
.
I'm sufficiently old fashioned that I still make a separate swap partition; these days I use 1G or 2GB as the size, which is enough to keep Linux happy without risking death by swapping. I use a software RAID mirror for this too, because why not. More daring people can swap to a file in the root filesystem, although that may be harder to set up during the initial system install.
I have no idea how you want to set up your system filesystem(s) if you want (or have to have) an encrypted root filesystem. Perhaps someday I'll have to worry about that, but not right now.
(I have no particular opinions on what you should do on a laptop
where you have a single disk and that's it. On my casual usage work
laptop, I think I just made everything a single filesystem on the
single disk and shrugged about my home directory being in /home
and sharing space with the root filesystem.)
Comments on this page:
|
|