.

Expanding the virtual disk, Linux guest OS

Expanding the virtual disk is the same regardless of the guest OS. How to make the extra space usable is dependent on guest OS.

The easy part, expanding the virtual disk:

    vmware-vdiskmanager -x 32GB ScientificLinux45.vmdk

where you replace "32GB" with your desired new total disk size, and "ScientificLinux45.vmdk" with the name of your virtual disk's main file.

Now, in your Linux guest OS, you run fdisk /dev/sda. Enter p to print out the existing partition table. Enter n to create a new partition. Select extended or primary (probably primary) and then the new partition number (one higher than the number of partitions shown by p). If you don't want the standard Linux partition type (83), you can change it with t (of course, if you care about partition type, you probably already know that; if you don't know what partition type you want, then you want to leave it as 83).

Next, you need to format the new partition. I chose to use the ext3 file system, and gave it the label "HOME" (because I intended to mount it as /home):

    mkfs.ext3 -j -L HOME /dev/sda3

I already had a /home directory, so I just needed to temporarily move everything out of it into a safe place. Then I edited /etc/fstab and added this line:

    /dev/sda3   /home       ext3    defaults    1 2

I mounted the directory (mount /home) and then copied (not move, just in case) everything I had moved out of the original /home directory into this brand-spanking new /home directory. Then, just to make sure I hadn't messed anything up, I rebooted.

The new /home automounted on boot-up as expected and my user login worked (i.e. the /home/user directory was as it use to be). So, now that I was assured everything was working, I deleted the temporary copy of the original /home directory's contents.


If we cannot now end our differences, at least we can help make the world safe for diversity.

John F. Kennedy

A2 Web Hosting
Creative Commons License
GoDaddy
Look for:

loaded 2012-02-04 13:02:44 • last modified 2009-03-10 17:19:35
Privacy PolicyDisclaimer
• awcfamily.com is powered by PmWiki v.2002016 •
• all content (unless otherwise noted) © 2012 A W Colley