Results 1 to 2 of 2

Thread: growfs after increasing Ubuntu Guest OS Virtual Disk

  1. #1
    Join Date
    Jan 2009
    Location
    Australia
    Beans
    25

    growfs after increasing Ubuntu Guest OS Virtual Disk

    VMWare ESXi 3.5 I have a Ubuntu JeOS Hardy guest.

    It was a simple deployment, 10G disk with automatic guided disk partitioning during the install.

    This created (as expected) the following partitioning:

    Code:
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda1             9.5G  5.9G  3.2G  66% /
    varrun               1014M   64K 1014M   1% /var/run
    varlock              1014M     0 1014M   0% /var/lock
    udev                 1014M   40K 1014M   1% /dev
    devshm               1014M     0 1014M   0% /dev/shm

    For the identical task on Windows, it's trivial. Shutdown the OS, increase size, boot into gparted and 'resize' by dragging the NTFS partition all the way across.

    How do I do this with Ubuntu Server? When I tried booting into gparted, it showed me the below. It didn't allow me to 'move' the swap to the end. If it allowed me to do that, I would have moved it to the end then resized root.




    Any thoughts?

    I'm sure this is pretty standard and many many people have done what I'm trying to do.

    Cheers

  2. #2
    Join Date
    Jan 2009
    Location
    Australia
    Beans
    25

    Re: growfs after increasing Ubuntu Guest OS Virtual Disk

    I thought I'd mention the fix here because it's already number 1 hit for "Increasing Ubuntu Guest OS Virtual Disk"

    You need to do the following:
    1. Boot gparted live CD
    2. Click on the extended partition at the bottom and click Resize/Move at the top. Drag it all the way across to the right thus making it take up the remaining unallocated space.
    3. Click on the linux-swap partition at the bottom, click Resize/Move and drag it across to from the left to the right. Don't resize, move.
    4. Now resize the Extended partition from above, and shrink it. Drag it from the left to the right so it's just the extended partition and the swap space taking up the right most of the disk.
    5. Now resize the left most primary root partition ext3 to utilize the unallocated space in the middle of the drive.
    6. Apply changes, and reboot.


    Being VMWare, it's quick, easy and wise to perform a quick offline backup before making these changes.

    1. Shutdown VM
    2. vmkfstools -i source.vmdk backup_source.vmdk

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •