Professional Documents
Culture Documents
Before Resizing The Logical Volume
Before Resizing The Logical Volume
Zachary Buckholz
zach.buckholz@apollogrp.edu
Summary: This document provides step-by-step instructions for increasing the disk resources for a VMware
guest system running Oracle Enterprise Linux under VMware 3.x.
Using the VIC client right-click the VM Guest you are going to add disk resources to. When the context
menu appears left-click “Edit Settings”
On the next screen left-click the “Add” button which is highlighted below.
On the next screen left-click the “Hard Disk” option, then left-click “Next”.
On the next screen “Create a new virtual disk” should be selected by default, if not select it and left-
click “Next”.
On the next screen set the disk size and location. Additional disks can always be added in the future so
there is no need to over commit disk resources. Just add what is justified at this time. The “Location”
option should be left at the default setting of “Store with the virtual machine”. Left-click “Next” to
continue.
On the next screen the “Virtual Device Node” will default to the next available, leave everything alone
here. Left-click “Next”.
On the next screen just left-click “Finish”.
On the next screen just left-click “Ok”.
The VIC screen will show the status of the task at the bottom, once it completes the VM Guest needs to
rescan the SCSI bus to detect the new disk.
Log into the VM Guest and run the rescan-scsi-bus.sh shell script located under /root as the root user.
If the rescan-scsi-bus.sh shell script is not available on the system, it can be obtained from
http://bash.cyberciti.biz/diskadmin/rescan-scsi-bus.sh.php
Issue an fdisk –l to list the current disks and partitions, and obtain the new device name assigned by the
system to the new disk. The new disk is highlighted below.
Next extend the volume group to include the newly created physical lvm disk using the vgextend command.
Issue a vgdisplay to obtain the volume group name. The volume group is highlighted below.
Next extend the logical volume to include 100% of the newly added free space in the volume group.
The last step is to increase the file system size to include the newly created logical volume disk space.
Use the Linux resize2fs command and pass as a parameter the Logical Volume device.
Initial VM Guest
[root@oelvm ~]# df –h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
6.7G 3.2G 3.2G 51% /
/dev/sda1 99M 19M 75M 21% /boot
tmpfs 250M 0 250M 0% /dev/shm
After adding a new disk in the VMware Console, and resizing the Logical Volume: (31 GB free space)
[root@oelvm ~]# df –h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
36G 3.3G 31G 10% /
/dev/sda1 99M 19M 75M 21% /boot
tmpfs 250M 0 250M 0% /dev/shm
After adding another disk and resizing the file system: (44 GB free space)
[root@oelvm ~]# df –h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
44G 7.0G 35G 17% /
/dev/sda1 99M 19M 75M 21% /boot
tmpfs 250M 0 250M 0% /dev/shm