i’m running oneb 4.10.2 with two nodes and nfs storage. I have a VM running the Ubuntu 14.04 - KVM image from the marketplace which has 10GB storage capacity.
Whats my best option to change the capacity? I have successfully attached a second disk (Datablock) but Ubuntu doesn’t recognize it. I would prefer to just expand the OS disk if possible.
Regarding the datablock; that will give you a raw device, which you cant mount as a qcow2 image, which is probably what the marketplace uses. after creating a datablock, change type in ONE to OS, add to VM and boot it.
cat /proc/partitions
Should show the extra disk now.
Basically, if your marketplace image works with qcow2, check the link for instructions to resize it.
If your current ubuntu image is raw, add an extra datablock as disk or use the same guide, without converting it to qcow2.
EDIT: found another (easier) way, but I havent tried this before:
Increase the qcow2 disk. It a simple command to increase the size of the disk. Here I am adding 5GB to an Ubuntu Server disk.
If your Ubuntu Image is in LVM format you could add the new disk to the
template and after add the new disk to the LVM Disks. With this you could
expand the golden images adding new disks to the template.
hi,
no you need to do that from the virtualization-host, with the VM shut down, so the image is not in use. It should be in /var/lib/one/datastores/0/random-hash/
so that returned “image resized”, and qemu-img info shows "virtual size: 300GB (what i want) and disk size: 12GB but the guest OS ubuntu doesn’t see the free space when using partitionmanager. as it turns out my guest OS disk is LVM. sunstone still shows 10GB size for that vm image.
You must to resize the partitions inside the Virtual Machine. After resize
the qcow image you have some free disk but you must expand the LVM
partitions inside the VM.
Power ON the VM and lvextend, after extended the LVM volume you must to
resize the filesystem inside the VM con resize2fs