Resizing a logical volume

From Nearline Storage
Jump to: navigation, search

Assuming the new disk is the device at /dev/sdb and your target logical volume is /VolGroup00/LogVol00

  1. dd if=/dev/zero of=/dev/sdb bs=412 count=1
  2. pvcreate /dev/sdb
  3. vgextend VolGroup00 /dev/sdb
  4. lvextend /dev/VolGroup00/LogVol00 /dev/sdb
  5. resize2fs /dev/VolGroup00/LogVol00

The "dd" clears the partition table and then you create a "whole disk" physical volume. You could, instead, create partition(s) with fdisk and then do pvcreate against the partition(s).