You are on page 1of 1

http://kb.vmware.com/selfservice/microsites/search.do?

language=en_US&cmd=displayKC&externalId=1007907


Increasing the size of a Linux ext3 virtual machine disk (1007907)
Purpose
This article provides steps to increase the size of a ext3 machine disk or partition that is not managed by the Logical Volume Manager (LVM) in a Linux virtual machine.

Note: This article provides guidance on extending a virtual disk within a virtual machine, which is an operating system level operation and includes significant changes to a virtual machine disk. VMware
recommends you to have a full backup of your virtual machine before attempting this procedure. If stability issues occur after extending the disk of the operating system, engage the operating system vendor
accordingly.
Resolution
To increase the size of the ext3 disk:
1. Increase the size of the virtual disk associated with the volume from the Virtual Infrastructure Client.
2. In the Linux virtual machine, reboot to see the larger disk.
3. Increase the size of the Linux partition to use the new space. If there is a swap and/or extended partition after it, you can unmount swap with:

# swapoff /dev/sdXY

This removes the extended partition temporarily. You can do this by going to fdisk /dev/sdX , delete Linux partition (type 83), recreate a new partition larger in size leaving space for the
swap partition, and quit.
4. Reboot the virtual machine again to see the new partition table.
5. Run this command to increase the filesystem size to use the full partition space:

# resize2fs /dev/sdXY

The X indicates the device number. The Y indicates the Linux partition.
6. Recreate a swap partition, if you originally had one.

To recreate the swap partition:
a. Reboot to see the partition table.
b. Run the commands:

# mkswap /dev/sdXY
# swapon /dev/sdXY

Where sdXY is the swap partition.
c. You might want to change the swap partition entry in /etc/fstab if the device name/number changed.
Note: You can also use the ext2online command which allows you to extend without unmounting. For more information, see http://linux.die.net/man/8/ext2online.

For instructions on increasing the size of a ext3 disk managed by Logical Volume Manager, see Extending a logical volume in a virtual machine running Red Hat or Cent OS (1006371).

You might also like