- Snapshot any file system (other then /boot) for backups, or to make images, or to test something out.
- Migrate a logical volume (LV) from one physical volume (PV) to another, without having to take the file system offline or deal with downtime.
- Resize file systems that are too large or too small, with minimal downtime (if the file system supports it).
These days, when I setup disk partitions to hold a server's boot-up files, I only create (2) partitions on the drive. One for the Software RAID-1 mirror set to hold /boot (usually 256-1024MB) and the rest of the drive is a second RAID-1 mirror set that is turned into a LVM physical volume (PV) and assigned to a volume group. I will usually only partition out to about 99% of the drive size if I'm doing Software RAID, because that makes it easier later to put in a different model disk of the same capacity and still have things work. Drives from different manufacturers have slightly different capacities, so you can run into trouble down the road when you go to replace a failed drive if you assumed all drives were exactly the size as your original drives.
Inside that LVM volume group (VG), I create all of my other partitions. These days, that means:
- / - the "root" partition, usually 16-32GB for CentOS 6
- /home - Usually starts at 4GB for a server where people won't be logging in much.
- /opt - 4-24GB
- /srv - 1-4GB (sub-directories get their own LV later)
- /tmp - 4-24GB
- /usr/local - 8-24GB
- /var - 4-24GB
- /var/log - 4-24GB
- /var/spool - 2-4GB to start
- /var/tmp - 2-8GB to start
Follow ups:
- GRUB2 understands mdadm (software RAID) and LVM. So we will eventually be able to put /boot in an LVM volume. But the GRUB that ships with RHEL6 and CentOS6 is still GRUB 0.97.
No comments:
Post a Comment