PreviousINDEXNext
Migrating to FreeBSD 10rpi-update ate my SD card

Extending disk space on LVM

I was able to gain practical experience of extending disk space on a LVM volume on a Redhat system recently. One of our VMWare database servers used up all the disk space. To add more disk space, here's the process:

  1. Added disk resource (10GB) to the VM hard disk (Hard Disk 0) using the VSphere client.
  2. On the database server, used fdisk to create a new 10GB partition (/dev/sda3) on the new free space.
  3. Rebooted so that the OS could see the new partition
  4. Added /dev/sda3 to lvm’s VolGroup00: vgextend VolGroup00 /dev/sda3
  5. Used lvextend to extend the LogVol00 size: lvextend -l +100%FREE /dev/VolGroup00/LogVol00
  6. Extended the ext3 partition sitting on top of LogVol00: resize2fs /dev/mapper/VolGroup00-LogVol00
PreviousINDEXNext
Migrating to FreeBSD 10rpi-update ate my SD card