Created
August 23, 2015 02:56
-
-
Save gnilchee/06c3ee86f533f1d58e66 to your computer and use it in GitHub Desktop.
re-sizing a lv on a ext4 root partition with 1.5G available in vg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vgs output: | |
VG #PV #LV #SN Attr VSize VFree | |
vg_centos 1 2 0 wz--n- 9.51g 1.50g | |
============= | |
lvdisplay /dev/vg_centos/lv_root output: | |
--- Logical volume --- | |
LV Path /dev/vg_centos/lv_root | |
LV Name lv_root | |
VG Name vg_centos | |
LV UUID yADUTB-na3L-7kLC-vylN-GGYB-b14w-viBIjb | |
LV Write Access read/write | |
LV Creation host, time centos, 2015-08-23 02:37:26 +0000 | |
LV Status available | |
# open 1 | |
LV Size 7.51 GiB | |
Current LE 1922 | |
Segments 1 | |
Allocation inherit | |
Read ahead sectors auto | |
- currently set to 256 | |
Block device 253:0 | |
============= | |
df -h output: | |
Filesystem Size Used Avail Use% Mounted on | |
/dev/mapper/vg_centos-lv_root | |
7.3G 625M 6.3G 9% / | |
tmpfs 939M 0 939M 0% /dev/shm | |
/dev/vda1 477M 30M 422M 7% /boot | |
============= | |
command as root: | |
lvmextend -L+1G /dev/vg_centos/lv_root | |
============= | |
command as root: | |
resize2fs /dev/vg_centos/lv_root | |
============= | |
vgs output: | |
VG #PV #LV #SN Attr VSize VFree | |
vg_centos 1 2 0 wz--n- 9.51g 512.00m | |
============= | |
df -h output: | |
Filesystem Size Used Avail Use% Mounted on | |
/dev/mapper/vg_centos-lv_root | |
8.3G 655M 7.2G 9% / | |
tmpfs 939M 0 939M 0% /dev/shm | |
/dev/vda1 477M 30M 422M 7% /boot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment