ubuntu_extend_default_lvm_space
This is an old revision of the document!
Ubuntu - Extend Your Default LVM Space
$ df -h
Filesystem Size Used Avail Use% Mounted on tmpfs 791M 1.2M 790M 1% /run /dev/mapper/ubuntu--vg-ubuntu--lv 98G 7.0G 86G 8% / tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock /dev/sda2 2.0G 130M 1.7G 8% /boot tmpfs 791M 4.0K 791M 1% /run/user/1000
user@svr1:~$ sudo vgdisplay [sudo] password for user:
--- Volume group --- VG Name ubuntu-vg System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 2 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 1 Act PV 1 VG Size <929.00 GiB PE Size 4.00 MiB Total PE 237823 Alloc PE / Size 25600 / 100.00 GiB Free PE / Size 212223 / <829.00 GiB VG UUID rF3fw2-13h2-kAiL-aeWA-KyDZ-5HQU-GwvKDe
user@svr1:~$ sudo lvdisplay
--- Logical volume --- LV Path /dev/ubuntu-vg/ubuntu-lv LV Name ubuntu-lv VG Name ubuntu-vg LV UUID xUUIxr-wnDl-7ZNk-EQpK-gAwb-Wug0-a7JSTb LV Write Access read/write LV Creation host, time ubuntu-server, 2023-06-28 23:21:26 +0000 LV Status available # open 1 LV Size 100.00 GiB Current LE 25600 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0
user@svr1:~$ sudo su root@svr1:/home/user# cd root@svr1:~#
root@svr1:~# lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
Size of logical volume ubuntu-vg/ubuntu-lv changed from 100.00 GiB (25600 extents) to <929.00 GiB (237823 extents). Logical volume ubuntu-vg/ubuntu-lv successfully resized. root@only1:~#
Run lvdisplay once more to verify that that the logical volume was successfully resized.
root@only1:~# lvdisplay --- Logical volume --- LV Path /dev/ubuntu-vg/ubuntu-lv LV Name ubuntu-lv VG Name ubuntu-vg LV UUID xUUIxr-wnDl-7ZNk-EQpK-gAwb-Wug0-a7JSTb LV Write Access read/write LV Creation host, time ubuntu-server, 2023-06-28 23:21:26 +0000 LV Status available # open 1 LV Size <929.00 GiB Current LE 237823 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 root@only1:~#
ubuntu_extend_default_lvm_space.1688063150.txt.gz · Last modified: 2023/06/29 18:25 by wikiadmin