Submitted by mcordas on Wed, 10/13/2010 - 14:06 Pro Licensee
I'm trying to use Cloudmin's "Manage Disks" function to resize the image of a KVM virtual machine.
The image is on a LVM Volume, with a /boot (hda1) and a / (hda2) partition.
Cloudmin answers : ".. update failed : Only the last partition on a disk image can be resized"
Is there a way to resize such a VM filesystem ?
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Wed, 10/13/2010 - 15:46 Comment #1
Does this virtual disk only have 2 partitions?
I would be interested to see the output of
fdisk -l /dev/hda
run inside the VM.Submitted by mcordas on Wed, 10/13/2010 - 16:14 Pro Licensee Comment #2
Yes, as said there's 2 partitions on the disk (/boot and /). Here's the output of fdisk -l /dev/hda :
/dev/hda1 * 1 14 112423+ 83 Linux
/dev/hda2 15 261 1984027+ 83 Linux
Submitted by JamieCameron on Wed, 10/13/2010 - 16:20 Comment #3
That looks OK ..
What does the
/etc/fstab
file contain on the VM ?Submitted by mcordas on Wed, 10/13/2010 - 16:26 Pro Licensee Comment #4
Here :
[root@sql ~]# cat /etc/fstab
/dev/hda1 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
Submitted by JamieCameron on Wed, 10/13/2010 - 16:41 Comment #5
That seems in-consistent with the partition table above .. if
/dev/hda1
is mounted on/
, why is it so small in the partition table?What does the
mount
command output?Submitted by mcordas on Wed, 10/13/2010 - 17:07 Pro Licensee Comment #6
Yes, it's true that's inconsistent...
This VM was built from a 2Gb system image. The file system in the original image had /boot on /dev/hda1, and / on /dev/hda2, as in the first output above.
Something must've been going wrong during the creation of the VM.
Here : [root@sql ~]# mount
/dev/hda1 on / type ext3 (rw)
proc on /proc type proc (rw
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
I don't even understand why the vm boots !
Should we create system images with a single / partition ?
Submitted by JamieCameron on Wed, 10/13/2010 - 17:13 Comment #7
That
mount
output looks crazy - it has/dev/hda1
listed twice!Yes, I strongly recommend creating VMs with just a single / partition. Unless you have a huge disk (which is unlikely for a VM), there is no need for a separate /boot .
Submitted by mcordas on Wed, 10/13/2010 - 17:16 Pro Licensee Comment #8
OK. I think I'll have to recreate the system image from scratch.
If I do so, will I be able to resize LVM partitions via Cloudmin ?
Submitted by JamieCameron on Wed, 10/13/2010 - 17:21 Comment #9
Yes, partition resizes will work (on LVM or regular files) as long as the disk contains a single partition..
Submitted by mcordas on Wed, 10/13/2010 - 17:26 Pro Licensee Comment #10
OK. Thanks again. Had to stay up a little late (I'm in Switzerland...), but it was worth it. I'll take care of that system image tomorrow... ;)
Cheers,
Miguel.
Submitted by JamieCameron on Wed, 10/13/2010 - 17:35 Comment #11
Great!
Submitted by Issues on Wed, 10/27/2010 - 20:20 Comment #12
Automatically closed -- issue fixed for 2 weeks with no activity.