Me, The programmer

Just another WordPress.com site

Resizing a Root LVM Fedora Partition Running on Virtualbox

Alright, I just went through *A LOT* of trouble to resize a Fedora partition running on a VirtualBox. This is what I did.

  1. My previous VirtualBox had 8gb of space. I created a new one with 30gb
  2. VBoxManage.exe clonehd OldHD.vdi NewHD.vdi –existing (this will copy your current filesystem over to the new virtual hard drive)
  3. On the previous step the file system was copied over, but the extra space will be left as unallocated, so now we need to expand your root partition. In order to do this, you will need to usa a Fedora Live CD.
  4. After the CD has booted, open a terminal and elevate it with “su”.
  5. Run system-config-lvm
  6. Find the uninitialized entities and initialize them
  7. Close system-config-lvm
  8. On the terminal, run lvresize -L +XXXGB /dev/PARTITION_PATH. This will extend your partition.
  9. Your partition has been extended now, but your filesystem still doesn’t know about it. Now run resize2fs -p /dev/PARTITION_PATH and voilá.

Hope this helps.

Advertisements

2 responses to “Resizing a Root LVM Fedora Partition Running on Virtualbox

  1. Pingback: Logical Volume Management (LVM2) and VirtualBox « Chronofile

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: