[SGVLUG] Linux Partitioning for Server

Rae Yip rae.yip at gmail.com
Tue Apr 7 16:13:24 PDT 2009


There have been plenty of replies already, but I'll throw in my $0.02.

I tend to agree with Tom; LVM is a wonderful thing. The main idea is
to allow you to size your filesystems according to your actual needs,
and worry about the physical layout separately.

That said, if you're running this as a production server, I agree with
others who have said that RAID 1 is a better way to go for the root
disk; especially if you want to get decent performance out of your
swap.

You may think that getting the most capacity out of your drives is
your priority, but with 4 disks, you're losing 1 disk to parity
anyway, and paying a likely uptime penalty for not having a hot spare.
So why not go with RAID1 and worry less? You'll only get 2N capacity
instead of 3N, but 66% capacity on five 9's uptime is better than 100%
on three 9's, if you care at all about that.

As for sizing your filesystems, it's good practice to keep a separate
/boot because you generally don't want to deal with fs corruption at
the bootloader prompt. I tend not to give all space to / because you
want a separate /var and to keep fsck times low, but 2gb is too small
for modern distros.

It's okay to keep /home part of / on a prod server, as long as your
apps and data are stored on a separate fs (ie. /app or /srv); you may
want to keep your app logs on yet another fs to keep them from
crowding your data, but this depends on the app. So this looks
something like:

/boot      20-100MB
/            20-40GB
swap      1.5 - 2x RAM
/var        6-15GB (more if you keep app logs here too)
/app       rest of space - /app/log size
/app/log  depends on app and desired retention

That's only six logical partitions, not too much to remember. I would
do things differently for a desktop (bigger separate /home, smaller
/app).

Finally I would ask, do you know how you can tell inside Linux that
you've had a hardware RAID failure? I don't have much experience with
PC RAID controllers, but if you can't tell when you need to replace a
disk, then you have no business using hardware RAID. Factor in recent
discussion about RAID5 not scaling to larger disks.

-Rae.


More information about the SGVLUG mailing list