KVM
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
root@server3.kutayzorlu.com:~# qemu-img resize vmdisk.img +100G # GPARTED and extend disk root@server3.kutayzorlu.com:~# lvdisplay --- Logical volume --- LV Path /dev/telekom_kutayzorlu_com-vg/root LV Name root VG Name telekom_kutayzorlu_com-vg LV UUID s4szbj-zgxD-jniW-j904-wEhe-CQSf-3D2CXW LV Write Access read/write LV Creation host, time telekom_kutayzorlu_com, 2015-05-26 16:44:59 -0500 LV Status available # open 1 LV Size 9.26 GiB Current LE 2370 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 252:0 --- Logical volume --- LV Path /dev/telekom_kutayzorlu_com-vg/swap_1 LV Name swap_1 VG Name telekom_kutayzorlu_com-vg LV UUID wcVWPh-kcec-0892-0hpj-wa34-l6eJ-VGnCp3 LV Write Access read/write LV Creation host, time telekom_kutayzorlu_com, 2015-05-26 16:44:59 -0500 LV Status available # open 2 LV Size 512.00 MiB Current LE 128 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 |
Important for us
|
LV Path /dev/telekom_kutayzorlu_com-vg/root LV Name root |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
root@server3.kutayzorlu.com:~# root@server3.kutayzorlu.com:~# vgdisplay --- Volume group --- VG Name telekom_kutayzorlu_com-vg System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 1 Act PV 1 VG Size 29.76 GiB PE Size 4.00 MiB Total PE 7618 Alloc PE / Size 2498 / 9.76 GiB Free PE / Size 5120 / 20.00 GiB VG UUID 6OvM2c-4jFf-5Mqt-IbrF-8f5O-2hsh-EjVIGd |
**>> Free PE / Size 5120 / 20.00 GiB
So Firstly we are extending volume group
# lvextend -l +5120 /dev/telekom_kutayzorlu_com-vg/root
After Resize to see Action in Disk Size Now
# resize2fs /dev/telekom_kutayzorlu_com-vg/root
If you are using XFS file format it will give error so use that
# xfs_growfs /dev/telekom_kutayzorlu_com-vg/root
|
root@server3.kutayzorlu.com:~# df -h Filesystem Size Used Avail Use% Mounted on udev 990M 0 990M 0% /dev tmpfs 201M 4.7M 196M 3% /run /dev/mapper/telekom_kutayzorlu_com--vg-root 29G 2.8G 25G 10% / tmpfs 1001M 0 1001M 0% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 1001M 0 1001M 0% /sys/fs/cgroup /dev/sda1 236M 42M 182M 19% /boot tmpfs 201M 0 201M 0% /run/user/1000 |