1. Check for free space by running. #cfdisk
- see if there is free space listed, can proceed to step 2
- if don’t see free space listed, initiate a rescan of /dev/sda
- #echo 1>/sys/class/block/sda/device/rescan
- once done, re-run
#cfdisk
2. Select which partition to extending. Example - /dev/sda3 partition from the list and then select “Resize”
3. ENTER and it will prompt to confirm the new size. Now /dev/sda3 partition with a new larger size.
4. LVM partition backing the /dev/sda3 Physical Volume (PV) has been extended. Then need to extend PV
- #pvresize /dev/sda3 ->
- #pvdisplay - to check the new size
- #vgdisplay - check the Volume Group (VG) free space
- #lvdisplay - check the size of our upstream Logical Volume (LV)
- #lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
- #df -h - check current size of the file system
- #resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
- (centos) #xfs_growfs /dev/mapper/xxxx/xxxx
Source : https://packetpushers.net/ubuntu-extend-your-default-lvm-space/
0 comments:
Post a Comment