This is one of the feature that is important when using a VM.
I created a standard centos guest with 32GB and it's IDE.
Now I want to increase the volume size. I shutdown the guest. Next, I tried using the resize function in the GUI. After than I can see the size increased in the proxmox gui.
After that I start up the server and it starts fine. I use fdisk:
I can see the size of /dev/sda has increased. However, I tried using lvextend or lvresize or vgresize and so on to extend the LVM size without success.
See, it is showing no Free space available.
Anyone can help? I have been googling around but this is so confusing. A lot of the tutorial told about using qemu-img to convert the vm to raw then increase the size and dd into the new storage and then convert back to qcow. If that is the case, what is the resize function for in the GUI?
I have also tried the commandline method of qemu-img and dd. However, once I created the new image, how do I add it back into the VM?
I created a standard centos guest with 32GB and it's IDE.
Now I want to increase the volume size. I shutdown the guest. Next, I tried using the resize function in the GUI. After than I can see the size increased in the proxmox gui.
After that I start up the server and it starts fine. I use fdisk:
Code:
[root@localhost ~]# fdisk -l
Disk /dev/sda: 39.7 GB, 39728447488 bytes
255 heads, 63 sectors/track, 4830 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ab504
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 4178 33041408 8e Linux LVM
Disk /dev/mapper/VolGroup-lv_root: 32.8 GB, 32791068672 bytes
255 heads, 63 sectors/track, 3986 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VolGroup-lv_swap: 1040 MB, 1040187392 bytes
255 heads, 63 sectors/track, 126 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
I can see the size of /dev/sda has increased. However, I tried using lvextend or lvresize or vgresize and so on to extend the LVM size without success.
Code:
[root@localhost ~]# vgdisplay --- Volume group ---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
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 31.51 GiB
PE Size 4.00 MiB
Total PE 8066
Alloc PE / Size 8066 / 31.51 GiB
Free PE / Size 0 / 0
VG UUID 1q01KM-sIal-wXTi-YT4A-Esva-iU3M-nCCSUv
See, it is showing no Free space available.
Anyone can help? I have been googling around but this is so confusing. A lot of the tutorial told about using qemu-img to convert the vm to raw then increase the size and dd into the new storage and then convert back to qcow. If that is the case, what is the resize function for in the GUI?
I have also tried the commandline method of qemu-img and dd. However, once I created the new image, how do I add it back into the VM?