.
  • Print

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.


October. This is one of the peculiarly dangerous months to speculate in stocks in. The others are July, January, September, April, November, May, March, June, December, August, and February.

Mark Twain
Pudd’nhead Wilson, 1894

Look for:
A2 Web Hosting
Creative Commons License
loaded 2010-09-07 07:01:02 • last modified 2009-03-10 17:19:35
Privacy PolicyDisclaimer
• awcfamily.com is powered by PmWiki v.2001944 •
• all content (unless noted otherwise) © 2010 A W Colley
this website and its contents are licensed under the
Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License
Registrar
Valid XHTML 1.0 Transitional