Resizing volumes in RHEL

  1. Ensure disk is already expanded from hypervisor
  2. Check the list of disks attached lsblk
  3. Check if the disk expansion was recognised by RHEL
    fdisk /dev/sda
    Press p to check properties
    Press q to quit fdisk
  4. Delete the partition for the disk
    fdisk /dev/sda
    Press d and select the partition number (e.g 3)
    Press n to re-create partition
    Press t to select type. 8e is for local LVM filesystem
    Press w to write the changes
  5. Reprobe the disks modprobe -s
  6. Resize the PV pvresize /dev/sda
  7. Verify the disk is re-sized vgdisplay
  8. Verify the lv lvdisplay and confirm the LV that we want to expand
  9. Extend LV lvextend -l +100%FREE /dev/rhel_bastion/root
  10. Verify the LV size was extended lvdisplay
  11. Extend the filesystem to recognise the new disk size.
    For xfs filesystem: xfs_growfs /dev/rhel_bastion/root
    For other filesystem: resize2fs /dev/rhel_bastion/root