create ASM disk on vmware

Latest response

i need the steps to create ASM disk alias on a Redhat 6.1 on virtual machine ,i can't get the id of uuid of the new disk i added and i haven't oracleasm lib.
need your help to solve this problem

Responses

I believe kmod-oracleasm was not available until RHEL 6.3. Therefore, I am not sure how much help what I am about to give will be. Also, if I recall - there was a dependency on UDEV for ASM device permissions that made setup a bit more challenging. Either way - I think you can try what I have below and hopefully someone else that has more experience with the older release and virtual nodes can also contribute.

This is (sort of) the procedure I use. I believe any differences between a physical node using multipath and what you are trying to accomplish should not present insurmountable issues ;-)

To add/discover your new storage

yum -y install sg3_utils
rescan-scsi-bus.sh
blkid

Once you have found your storage, do the following for each of the new devices (i.e. /dev/sdb, /dev/sdc)
NOTE: This step is NOT necessary. However, we add a partition to each device in hopes that if an admin comes along later they will see the device has a partition and therefore know that it is in use (even though it's not part of LVM).

parted -s /dev/<device> print
parted -s /dev/<device> mklabel msdos
parted -s /dev/<device> mkpart primary ext3 0 100%
partprobe

Then you will need to download the packages from Oracle

yum -y localinstall kmod-oracleasm oracleasmlib oracleasm-support

I use multipath devices for my setup. Therefore, I will need to update the oracleasm configuration. This part of the config simply tells the host what devices to scan for.

vi /etc/sysconfig/oracleasm
/etc/sysconfig/oracleasm
# ORACLEASM_SCANORDER: Matching patterns to order disk scanning
ORACLEASM_SCANORDER="dm"

# ORACLEASM_SCANEXCLUDE: Matching patterns to exclude disks from scan
ORACLEASM_SCANEXCLUDE="sd"

Then you need to add the devices to ASM. Technically I believe I could also use /dev/dm-XXX - however, I find that a bit more confusing in our environment. I believe you could use sdb1 (in your case). AFAIK - this step simply puts headers, etc.. on to the device. When "oracleasm scandisks" runs later, it dynamically looks for devices with the headers.

[root@pddclvmtxdba03 ~]# /etc/init.d/oracleasm start
[root@pddclvmtxdba03 ~]# /etc/init.d/oracleasm createdisk OCR02 /dev/vdc1
Marking disk "OCR02" as an ASM disk:                       [  OK  ]
[root@pddclvmtxdba03 ~]# /etc/init.d/oracleasm listdisks
OCR01
OCR02

I would also look for cvuqdisk and install that. It can be challenging to find it. I believe it is actually part of a bigger download from Oracle (one of the ClusterWare downloads, perhaps?), but occasionally I have found the individual package by itself.

For reference:
https://access.redhat.com/site/solutions/315643

The issue you have is that VMware by default does not pass through the device UUID's for the disks so the Oracle documentation (their udev rules) will fail to work because they depend on the UUID's to create the ASM symlinks in DEV.

To fix the problem enable the following option in the Virtual Machine configuration in VMware (unfortunately the VM needs to be turned off to enable this option):
disk.enableUUID=true

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.