LVM Extend Logical Volume and Filesystem

From UNIX Systems Administration
Revision as of 02:14, 28 January 2022 by Michael Kohler (talk | contribs) (Created page with "# Gather Filesystem information for the mount path #: <tt>'''# df -h <mount_path>'''</tt> # Gather logical volume "LV", volume group "VG" information, and physical volume "Dev...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  1. Gather Filesystem information for the mount path
    # df -h <mount_path>
  2. Gather logical volume "LV", volume group "VG" information, and physical volume "Device" information
    # lvs <filesystem_path> -o +devices,stripes
  3. Expand underlying disk
    Follow vendors procedure to expand underlying disk
  4. List SCSI device sizes, determine if added space was added to the device
    # lsscsi -s
    1. If space was not automatically added, rescan the SCSI Bus
      # echo '- - - -' > /sys/class/scsi_host/host#/scan
      Note: host# is from the first number in lsscsi -s [2:0:0:0], this would be host2
  5. Resize the expanded physical volume
    # pvresize <device>
  6. Expand the logical volume and file system
    1. Using all available space
      # lvextend -l +100%FREE -r <logical_volume_path>
    2. Not using all available space
      # lvextend -L +<size>[M|G|T] -r <logical_volume_path>