Skip to content

Instantly share code, notes, and snippets.

@mandeepbal
Last active August 29, 2015 14:27
Show Gist options
  • Save mandeepbal/cfd8b6acc8710cf243b2 to your computer and use it in GitHub Desktop.
Save mandeepbal/cfd8b6acc8710cf243b2 to your computer and use it in GitHub Desktop.
Increasing volume size on RHEL 7 running on top of VMware

Here is how to expand the space:

Check free volume space: sudo vgs

List volumes: sudo lvs

Expand logical volume: sudo lvextend -L+<space> <volume>

Check filesystem in use for that volume: cat /etc/fstab

If filesystem is ext3/4: sudo resize2fs <volume>

If filesystem is xfs: xfs_growfs <mount point for volume>

lvextend -L+5G /dev/mapper/VolGroup00-lv_opt
lvextend -L+15G /dev/mapper/VolGroup00-lv_var
xfs_growfs /dev/mapper/VolGroup00-lv_opt
xfs_growfs /dev/mapper/VolGroup00-lv_var
[root@bdrheldocker01 571885]# vgs
  VG         #PV #LV #SN Attr   VSize  VFree
  VolGroup00   1   6   0 wz--n- 79.51g 20.45g
[root@bdrheldocker01 571885]# lvs
  LV       VG         Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lv_audit VolGroup00 -wi-ao----  4.88g
  lv_home  VolGroup00 -wi-ao----  4.88g
  lv_opt   VolGroup00 -wi-ao----  9.88g
  lv_root  VolGroup00 -wi-ao---- 14.65g
  lv_tmp   VolGroup00 -wi-ao----  4.88g
  lv_var   VolGroup00 -wi-ao---- 19.88g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment