I have an Ubuntu virtual machine running in VirtualBox 2.2.4, and I created it on an 8gb virtual disk which is too small.
So, I am trying to increase the size of the disk. So far, I have done this:
- Created a new larger virtual disk
- Added the 2nd disk to the machine
- Used CloneZilla to clone the first disk onto the 2nd disk
- Removed the first disk
- Booted up off the 2nd (larger disk)
But now I'm still stuck with an 8gb partition on my new 100gb virtual disk.
Whats the easiest path from here to having a 100gb partition? 🙂 I gather GPart can resize partitions, but it doesn't seem to support LVM2 partitions, which mine seems to be.
thx
- Alex
Best Answer
In general, here's how to resize LVM volumes:
Let's say
/mountpoint
is on/dev/VolGroup00/mountpoint
. You can find this out by checking out/etc/fstab
or by runningmount -l
.You may also need to resize the actual Physical Volume, depending on your setup. Use
pvdisplay
to find out if it's big enough, and usepvresize
(much likelvresize
below) if necessary.This amounts to umounting, resizing the underlying LVM, then resizing the actual ext3 partition.
A few things to be careful of:
/
will be different from a data partition. You may need a boot disk such as Sysrescuecd instead of Doing It Live. Also see Kristof's comment below -- you may actually be able to do this without unmounting/
.