Extending disk value on bradnormac

From Bradnor
Jump to navigation Jump to search

To extend logical disk volume on bradnormac.

https://blog.mylab.cc/2022/02/26/How-to-resize-the-root-LVM-partition-of-Ubuntu/

check stuff
see how much space we have
$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.6G 1.8M 1.6G 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 351G 192G 144G 58% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/sda2 2.0G 370M 1.5G 21% /boot
/dev/sda1 1.1G 6.1M 1.1G 1% /boot/efi
extend the logical volume - by half of what's free
$ sudo lvextend -l +50%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
extend the file system
$ sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
and another run of df should show more free space