resizing disc doesn't work out of the box?

offerlam

Renowned Member
Dec 30, 2012
218
0
81
Denmark
Hi all,

So im trying to resize my ubuntu 64 bit vm with an aditional 2GB of space..

So i went to the proxmox web gui.. clicked on my vm and went hardware. clicked on the disk and choose resize and added the 2GB of space..

all seem well and all undtil I went to vm console and put in the command df -h

no change..

My vm was installed using fixed disk or rather the only install option in the ubuntu installation menu that does involve LVM or manual creation.

My proxmox solution is a dell R300 connected to a QNAP TS-410 using NFS...
My ubuntu vm is using VIRTIO as storage and LAN drive. The VM disc is in the QCOW format

I have a buddy of mine saying his works on the fly by doing this in the web gui only..
His using internal storage so i don't know if that might be the issue?

I have been here: http://pve.proxmox.com/wiki/Resizing_disks but i couldn't find anything that would help.. my assumption is this should work automaticly from the web gui IF you are using the QCOW format along with VIRTIO og the disc and perhaps LAN drivers...

Any suggestions?

THANKS

Casper
 
Hi all,

So im trying to resize my ubuntu 64 bit vm with an aditional 2GB of space..

So i went to the proxmox web gui.. clicked on my vm and went hardware. clicked on the disk and choose resize and added the 2GB of space..

all seem well and all undtil I went to vm console and put in the command df -h

no change..

My vm was installed using fixed disk or rather the only install option in the ubuntu installation menu that does involve LVM or manual creation.

My proxmox solution is a dell R300 connected to a QNAP TS-410 using NFS...
My ubuntu vm is using VIRTIO as storage and LAN drive. The VM disc is in the QCOW format

I have a buddy of mine saying his works on the fly by doing this in the web gui only..
His using internal storage so i don't know if that might be the issue?

I have been here: http://pve.proxmox.com/wiki/Resizing_disks but i couldn't find anything that would help.. my assumption is this should work automaticly from the web gui IF you are using the QCOW format along with VIRTIO og the disc and perhaps LAN drivers...

Any suggestions?

THANKS

Casper

Hi,
you will need to run gparted or the like over the newly increased virtual disk to enlarge the partition. The web GUI just resizes the virtual disk.

Cheers
 
For openvz increasing disk size it works on the fly.

How to make use of the increased disk depends on the way the filesystem is set up.

from your kvm system can you post the output of :
Code:
fdisk -l /dev/vda

using lvm or not and where the swap partition is located makes a difference on how to make use of the increased space.



PS:
as you probably already know, do a backup before the operation.
 
sorry for my late repsons.. been busy and it was my birthday some days ago :)

ok so just to hammer it in... One can NOT resize a disc completly with only using the web gui... you will have to use a partition tool to expand the partition with the extra disc space the proxmox webgui has added to the vm disc??

and the above still counts even if the vms disc format is QCOW...?

im not using openvz due to some security principles ... and im told i wouldn't gain much from using LVM since its a VM and you have QCOW...

THANKS

Casper
 
Ok guys.. so it seems if you want to expand your vms in the future you should at least use LVM...

but im failing bad at getting it to work..

I have a zimbra server that i resized in proxmox from 34G to 40G

when i do a df-h on my zimbra server it looks like this:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Zimbra01--vg-root 28G 6.8G 20G 27% /
udev 2.0G 8.0K 2.0G 1% /dev
tmpfs 791M 272K 791M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 0 2.0G 0% /run/shm
/dev/vda1 228M 78M 138M 37% /boot

but when you read up on lvm you need to to use this command to extend

sudo lvextend -L +5g foo/bar

what is foo/bar??

I figured i had to find a way to list LVMs in the terminal.. for that i used this command:

sudo vgdisplay

and it gave me the output like this:

--- Volume group ---
VG Name Zimbra01-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
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.76 GiB
PE Size 4.00 MiB
Total PE 8130
Alloc PE / Size 8130 / 31.76 GiB
Free PE / Size 0 / 0
VG UUID rUNzkA-3xW6-o0z4-Prwu-kNhj-GTB1-cQpEZA

so i figured this was my LVM volume

/dev/mapper/Zimbra01--vg-root

where foo was /dev/mapper/ and bar was Zimbra01--vg-root

with this assumption i went and did this:

offerlam@Zimbra01:~$ sudo lvextend -L +6g /dev/mapper/Zimbra01--vg-root
Extending logical volume root to 33.76 GiB
Insufficient free space: 1536 extents needed, but only 0 available

then i tried this thinking i just encreased it by 6G and maybe some of it was used for other stuff

offerlam@Zimbra01:~$ sudo lvextend -L +2g /dev/mapper/Zimbra01--vg-root
Extending logical volume root to 29.76 GiB
Insufficient free space: 512 extents needed, but only 0 available

but its not working.. what am i missing??

THANKS

Casper
 
Rob SO SORRY... didn't see you formed your post as a question...

actually i took the informaiton provided a bit further and figured i should use LVM for all my volumes to get the easiest way to resize my volumes IE it's easier to resize a LVM volume than a fixed one..??

and so i tried with the LVM and got stuck as i wrote above...

so here is the information you asked for:

Disk /dev/vda: 6442 MB, 6442450944 bytes
16 heads, 63 sectors/track, 12483 cylinders, total 12582912 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00081564


Device Boot Start End Blocks Id System
/dev/vda1 * 2048 7340031 3668992 83 Linux
/dev/vda2 7342078 8386559 522241 5 Extended
/dev/vda5 7342080 8386559 522240 82 Linux swap / Solaris
test@ubuntu:~$

Now this is a fixed disc setup and NOT LVM as my friend who said resizing worked on the fly said it had to be so...

Thanks!!

Casper
 
Disk /dev/vda: 6442 MB, 6442450944 bytes
16 heads, 63 sectors/track, 12483 cylinders, total 12582912 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00081564


Device Boot Start End Blocks Id System
/dev/vda1 * 2048 7340031 3668992 83 Linux
/dev/vda2 7342078 8386559 522241 5 Extended
/dev/vda5 7342080 8386559 522240 82 Linux swap / Solaris
test@ubuntu:~$
Hi Casper,
this output isn't from your Zimbra-node?! Or you use two hdds?!

If you need help, please post the right informations.

Best thing is the output of following commands:
Code:
# inside the zimbra-VM
fdisk -l
pvs
vgs
lvs

# from the pve node
cat /etc/pve/qemu-server/VMID.conf
Udo
 
Hi Udo,

ok so the output i provided was from my test vm... but since thats a test vm lets try again from my zimbra vm server... I have provided a screen shot wich should both show my vms hardware setup along with a ssh window providing a fdisk -l output..
proxmox.jpg

here is the pvs output:
offerlam@Zimbra01:~$ sudo pvs
PV VG Fmt Attr PSize PFree
/dev/vda5 Zimbra01-vg lvm2 a- 31.76g 0
offerlam@Zimbra01:~$

here is the vgs output
offerlam@Zimbra01:~$ sudo vgs
VG #PV #LV #SN Attr VSize VFree
Zimbra01-vg 1 2 0 wz--n- 31.76g 0
offerlam@Zimbra01:~$

here is the lvs output
offerlam@Zimbra01:~$ sudo lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
root Zimbra01-vg -wi-ao 27.76g
swap_1 Zimbra01-vg -wi-ao 4.00g
offerlam@Zimbra01:~$

here is the zimbra conf output:
root@proxmox01:~# cat /etc/pve/qemu-server/11
110.conf 111.conf 112.conf 113.conf 114.conf 115.conf 116.conf
root@proxmox01:~# cat /etc/pve/qemu-server/110.conf
bootdisk: virtio0
cores: 1
ide2: PM_Store_01:iso/ubuntu-12.04.3-server-amd64.iso,media=cdrom
memory: 4096
name: Zimbra01
net0: virtio=5E:DD:83:67:B7:26,bridge=vmbr0
ostype: l26
sockets: 1
virtio0: PM_Store_01:110/vm-110-disk-1.qcow2,format=qcow2,size=40G
root@proxmox01:~#

remember this is the zimbra vm and NOT the test vm which i provided eaerlier... the zimbra vm IS CREATED WITH LVM



THANKS

Casper
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!