[aklug] Re: rearranging a partition table

From: Jeremy Austin <jhaustin@gmail.com>
Date: Fri Dec 14 2012 - 20:47:50 AKST

It can be handy to boot a machine (virtual or otherwise) with gparted live
cd, and resize partitions that way. Backup first of course. But it's very
handy for copying/moving/resizing partitions of many varieties.

Converted, but did not resize, two disk images last week when migrating a
vm from VMware to kvm. Took several steps, from 2GB slices to monolithic
vdsk, and then to raw for kvm. I've resized those particular disks before
though. Would be nice if Windows had LVM.

jermudgeon

On Fri, Dec 14, 2012 at 8:31 PM, barsalou <barjunk@attglobal.net> wrote:

> While playing with a VM (VirtualBox 4.x), I ran out of room on the drive.
>
> Since this VM was just a version I was using to goof around, I thought,
> what the heck, let's try to extend it.
>
> Using VboxManage I was able to make the vdi extend from 15G to 25G.
>
> Of course, this doesn't fix the problem because the existing partitions
> only extended to the 15G mark...so I had to move them.
>
> This was fairly strait forward because there were only two partitions,
> swap and everything else.
>
> Swap was configured on an extended partion as partition 5.
>
> Also, I wanted to do this on the system that was currently mounted..to see
> what sorts of problems I could get myself into... :)
>
> Because the goal was to not trash the VM, I took it careful by following
> these general steps.
>
> Wrote down the existing partition table information.
> Turned off Swap
> Deleted the extended partition(2) and the swap partition(5).
> wrote the new table
> rebooted so the system would be using the new partition table
>
> everything OK so far, rebooted fine (didn't even have to modify /etc/fstab)
>
> Now the scary part...I removed the remaining partition(1) and recreated it
> to utilize more of the newly configured space. Being careful to start it
> at the exact same starting point as was initially configured.
>
> Next, the extended partition(2) and the swap partition(5) were recreated.
>
> Wrote the new partition table and rebooted again....fingers crossed.
>
> Everything came back up without an issue after a mkswap the new swap
> partition and adding it back to the /etc/fstab (the UUID had changed)
>
> Back in business!
>
> It isn't clear if a real machine would behave similarly, but it was an
> exciting exercise just the same.
>
> It would be great to hear about other folks experiences and solutions.
>
> ------------------------------**------------------------------**----
> This message was sent using IMP, the Internet Messaging Program.
>
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>
>

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Fri Dec 14 20:48:18 2012

This archive was generated by hypermail 2.1.8 : Fri Dec 14 2012 - 20:48:18 AKST