Adding a second disk to an LVM

In a world of storage on demand and virtualized environments, adding more storage on the fly has become simple even on Linux machines without expensive software like Veritas storage manager.  Here is how to proceed:

  • need to use LVM or LVM 2
  • add the new disk as an LVM capable physical volume: pvcreate /dev/sdb (or hdX)
  • add the new disk to the volume group, e.g. vgextend VolGroup00 /dev/sdb
  • extend the logical volume, e.g. lvextend -L +55G /dev/VolGroup00/LogVol00
  • unmount the volume to resize (this may require stopping services and/or boot into rescue mode)
  • check the partition: e2fsck -f /dev/VolGroup00/LogVol00
  • resizet the partition: resize2fs /dev/VolGroup00/LogVol00

If booting from rescue, before you can act on the partition, you need to enable it with:

  • vgchange -a y VolGroup00
  • lvchange -a y /dev/VolGroup00/LogVol00
This entry was posted in Linux and tagged , , , , . Bookmark the permalink.

NewPush has solutions to fit your business needs.  For more than a decade, our focus has been to take on the technical challenges that are the hardest and most time-consumming.  Our goal is to free up your resources to focus on the core activities of your business and to drive your business performance.  Please visit our main site at newpush.com for more information or call us at +1-303-423-4500.