LVM Resize a Physical Volume

From UNIX Systems Administration
Jump to navigation Jump to search

SAN Attached and VMWare Raw Mapped

  1. Resize the LUN on the storage subsystem
  2. Rescan the SCSI hosts
    # echo '- - -' > /sys/class/scsi_host/host#/scan
  3. Get the device paths of the physical volumes that will need to be resized
    # pvs
  4. Rescan the the SCSI block device
    # echo 1 > /sys/block/<block_device>/device/rescan
  5. Scan for physical volumes
    # pvscan
  6. Resize the physical volume
    # pvresize /dev/<block_device>

VMWare VMDK

  1. Resize the vmdk
  2. Update partition size
  3. Load the partition into the kernel
    # partprobe /dev/<device>
  4. Rescan the the SCSI block device
    # echo 1 > /sys/block/<block_device>/device/rescan
  5. Scan for physical volumes
    # pvscan
  6. Resize the physical volume
    # pvresize /dev/<block_device>

Further Reading