LVM Resize a Physical Volume: Difference between revisions

From UNIX Systems Administration
Jump to navigation Jump to search
(Created page with "== SAN Attached and VMWare Raw Mapped == # Resize the LUN on the storage subsystem. # Resize the the SCSI block device. ## <tt>'''# echo 1 > /sys/block/<block device>/device/r...")
 
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
== SAN Attached and VMWare Raw Mapped ==
== SAN Attached and VMWare Raw Mapped ==
# Resize the LUN on the storage subsystem.
# Resize the LUN on the storage subsystem
# Resize the the SCSI block device.
# Rescan the SCSI hosts
## <tt>'''# echo 1 > /sys/block/<block device>/device/rescan'''</tt>
#: <tt>'''# echo '- - -' > /sys/class/scsi_host/host#/scan'''</tt>
# Get the device paths of the physical volumes that will need to be resized
#: <tt>'''# pvs'''</tt>
# Rescan the the SCSI block device
#: <tt>'''# echo 1 > /sys/block/<block_device>/device/rescan'''</tt>
# Scan for physical volumes
# Scan for physical volumes
## <tt>'''# pvscan'''</tt>
#: <tt>'''# pvscan'''</tt>
# Resize the physical volume.
# Resize the physical volume
## <tt>'''# pvresize /dev/<block device>'''</tt>
#: <tt>'''# pvresize /dev/<block_device>'''</tt>
# Verify the resize was successful
#: <tt>'''# pvs'''</tt>


== VMWare VMDK ==
== VMWare VMDK ==
# Resize the vmdk.
# Resize the vmdk
# Resize the the SCSI block device.
# Rescan the the SCSI block device
## <tt>'''# echo 1 > /sys/block/<block device>/device/rescan'''</tt>
#: <tt>'''# echo 1 > /sys/block/<block_device>/device/rescan'''</tt>
# Update partition size
# Load the partition into the kernel
#: <tt>'''# partprobe /dev/<device>'''</tt>
# Scan for physical volumes
# Scan for physical volumes
## <tt>'''# pvscan'''</tt>
#: <tt>'''# pvscan'''</tt>
# Resize the physical volume.
# Resize the physical volume
## <tt>'''# pvresize /dev/<block device>'''</tt>
#: <tt>'''# pvresize /dev/<block_device>'''</tt>
# Verify the resize was successful
#: <tt>'''# pvs'''</tt>


== Further Reading ==
== Further Reading ==


[[Category:Linux]]
[[Category:Linux]]

Latest revision as of 18:19, 15 November 2021

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>
  7. Verify the resize was successful
    # pvs

VMWare VMDK

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

Further Reading