Partitioning Best Practice
From UGCS
(Difference between revisions)
(New page: =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...) |
|||
| Line 1: | Line 1: | ||
| − | |||
Unless noted otherwise, please follow these best practices in partitioning disks for servers in UGCS. | Unless noted otherwise, please follow these best practices in partitioning disks for servers in UGCS. | ||
| Line 15: | Line 14: | ||
* /dev/sd[a,b]3: Remainder of the disk in a RAID-1 for LVM | * /dev/sd[a,b]3: Remainder of the disk in a RAID-1 for LVM | ||
| − | =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. | * 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. | ||
* 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. | * 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. | ||
Revision as of 21:28, 28 April 2008
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.
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.
- 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.