Partitioning Best Practice

Unless noted otherwise, please follow these best practices in partitioning disks for servers in UGCS.


 * You should always set up your disks as RAID-1, even if you only have one disk. There is little to no performance cost for doing this, and it makes life much easier when you finally get that second disk for a raid-1.


 * You should use LVM for pretty much everything. Create logical volumes that are as big as they need to be, and don't fill up the volume group on first setup.  If there isn't any free space, you can't create snapshots, or make volumes later when you need it.  For example, / should only be 5 or 6 gb (in most cases for our servers).  If the need arises, you can grow the partition later- but shrinking it to make room for a new one is very difficult.  There are various things that may need their own partition, like DRDB or other cool stuff.


 * /boot should be its own partition, and not in LVM. You won't be able to use grub if you put /boot in an lvm.


 * I've started using reiserfs for /. It has just as good of recovery tools as ext3 (by that point you probably need backups anyways), and can grow easier.  If you do this, you will need to create a separate partition for /var/cache/openafs- but since you're using LVM, this is easy.

Partitioning Scheme

 * Each disk should be configured identically
 * /dev/sd[a,b]1: 128MB for /boot
 * /dev/sd[a,b]2: 2-4gb for swap (depending on the size of the disk and the machine)
 * /dev/sd[a,b]3: Remainder of the disk in a RAID-1 for LVM

LVM

 * Many times you can just put everything in /. If you make / a reiserfs, you will need to create a separate ext3 partition for AFS cache.
 * /tmp should be its own partition so that if it fills up, it causes fewer problems.
 * If you expect to be doing lots of database work, make /var a separate partition. This way, you can use LVM snapshots to minimize database downtime for backups.