You can use the procedure in this appendix to create a new filesystem on an existing guest to expand the amount of disk space available on a VM Guest.
Log onto the OVS host as root.
Change to the directory of the VM guest for which you want to expand disk space:
cd /OVS/running_pool/<Server_Name>
Use this command to create an empty flat file using the seek size to determine how large you need to make the /u02 mount point:
dd if=/dev/zero of=$PWD/NEW_DISK.img bs=1k seek=65000k count=0
where 65000k (Kilobytes) equals 65 Gigabytes (100 GB = 100000 KB)
Depending on the server, you can use these methods to shutdown the VM Guest:
Enterprise Server or HTML Web Server:
xm shutdown <Server_Name>
Database Server:
On the database server, log in as oracle.
Connect to database using this command:
sqlplus / as sysdba
To stop the database, use this command with the immediate parameter:
shutdown immediate
Log out of the database server
From the OVS host, run this command
xm shutdown <Server_Name>
Edit the vm.cfg
file to add the NEW_DISK.img
so it exists when you run xm create. You may also need to change the memory and vcpus settings. Refer to the bolded settings in this example vm.cfg
file:
name = "Server_Name" memory = "4096" disk = [ 'file:/OVS/running_pool/Server_Name/system.img,hda,w', 'file:/OVS/running_pool/Server_Name/E1_DB.img,hdb,w', 'file:/OVS/running_pool/Server_Name/NEW_DISK.img,hdc,w', ] vif = ['mac=<New_MAC_address in format xx:xx:xx:xx:xx:xx>', ] bootloader="/usr/bin/pygrub" vcpus=2 vfb = [ 'type=vnc,vncunused=1,vnclisten=0.0.0.0' ] on_reboot = 'restart' on_crash = 'restart'
Restart the Database Guest using this command:
xm create ./vm.cfg
Log onto the OVS host as root.
You must configure the /u02
virtual drive so the mount point for /u02
points to the NEW_DISK.img
file on the VM Guest using these commands:
mkdir /u02 fdisk /dev/hdc {create partition with commands below} Command: n primary partition: p Partition number: 1 First cylinder: enter {accept default of 1} Last cylinder: enter {accept default of cylinder size} Command: w pvcreate /dev/hdc1 vgcreate /dev/VolGroup02 /dev/hdc1 lvcreate -l 100%FREE -n LogVol00 /dev/VolGroup02 mkfs.ext3 /dev/VolGroup02/LogVol00 mount /dev/VolGroup02/LogVol00 /u02
Edit /etc/fstab
to add the following entry:
/dev/VolGroup02/LogVol00 /u02 ext3 defaults 0 0