When working with Oracle databases, it is highly recommended to use physical volumes attached to your virtual machines instead of shared virtual disks due to degraded performance when using virtual disks. Unfortunately, within the Oracle VM Manager you cannot add physical volumes to your virtual machine unlike shared virtual disks. In order to add physical disks to a virtual machine you must modify a VM’s vm.cfg file located under /OVS/running_pool/<vm_name>/. This directory contains a System.img file, a vm.cfg file, and a vm.cfg.orig file. An example of a basic vm.cfg file created by the OVM Manager looks like the following:

bootloader = ‘/usr/bin/pygrub’
disk = [‘file:/OVS/running_pool/28_rl-r710-n1/System.img,xvda,w’]
keymap = ‘en-us’ memory = ‘46000’
name = ’28_rl-r710-n1′
on_crash = ‘restart’
on_reboot = ‘restart’
uuid = ‘3e9222d6-ec80-ad64-d70c-63d96a6b6e68’
vcpus = 4
vfb = [‘type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=matrix123’]
vif = [‘mac=00:16:3E:6E:82:6C, bridge=xenbr0’, ‘mac=00:16:3E:03:A9:C9, bridge=xenbrb0’, ]

In order to add a physical disk, you must first verify that all the physical disks can be seen via the Oracle VM Server. This step was handled when you setup your shared storage. Once storage is properly setup you need to add the following line to the disk section of your vm.cfg file:

If using device mapper multipating your entry will look like:

‘phy:/dev/mapper/<alias_of_volume_from_device_mapper>,xvdb,w’,

If using EMC PowerPath your entry will look like:

‘phy:/dev/emcpower#,xvdb,w’,

If using a block device your entry will look like:

‘phy:/dev/<alias_of_volume_from_device_mapper>,xvdb,w’,

The prefix for a physical disk is the ‘phy’ followed by the location of your physical disk, which in the case of device mapper device would be /dev/mapper/<alias_of_volume_from_device_mapper>, followed by the label given to the physical disk when exposed to the virtual machine, in this case labeled ‘xvdb’, and the write permission given to the physical disk annotated by the ‘w.’ Below is an example of a vm.cfg file that exposes an OCR and voting disk volume, three database volumes and a flashback recovery area volume. The modifications from the original file are highlighted in bold and enlarged for easy distinction.

bootloader = ‘/usr/bin/pygrub’
disk = [‘file:/OVS/running_pool/28_rl-r710-n1/System.img,xvda,w’, ‘phy:/dev/mapper/ocrvote,xvdb,w’, ‘phy:/dev/mapper/db1,xvdc,w’, ‘phy:/dev/mapper/db2,xvdd,w’, ‘phy:/dev/mapper/db3,xvde,w’, ‘phy:/dev/mapper/fra,xvdf,w’,]
keymap = ‘en-us’
memory = ‘46000’
name = ’28_rl-r710-n1′
on_crash = ‘restart’ 24
on_reboot = ‘restart’
uuid = ‘3e9222d6-ec80-ad64-d70c-63d96a6b6e68’
vcpus = 4
vfb = [‘type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=matrix123’]
vif = [‘mac=00:16:3E:6E:82:6C, bridge=xenbr0’, ‘mac=00:16:3E:03:A9:C9, bridge=xenbrb0’, ]

Advertisements