Database Reference
In-Depth Information
same consistent name on every node of the RAC. However, by default, a storage volume is not guaranteed to have
the same name across all the RAC nodes. By mapping a LUN SCSI ID to the pseudo-device name and also setting
'user_friendly_names' to 'yes' in the multipath.conf file, the pseudo-device name will be kept consistent every time
each of the RAC servers gets rebooted, and this name is guaranteed to be identical on every node of the RAC if we use
the same multipath.conf on all the RAC nodes.
Set Ownership of the Devices
The next challenge in setting up devices for the Oracle RAC environment is to set proper ownership of these devices.
When these devices were initially created, they were owned by the root user, thus:
$ ls -l /dev/mapper/*
lrwxrwxrwx 1 root root 7 Oct 29 17:16 ocrvoting -> ../dm-8
lrwxrwxrwx 1 root root 7 Oct 29 17:16 data -> ../dm-9
And block devices dm-8 and dm-9 are owned by root:
$ls -l /dev/dm-*
brw-rw---- 1 root disk 253, 8 Oct 29 06:33 /dev/dm-8
brw-rw---- 1 root disk 253, 9 Oct 29 06:33 /dev/dm-9
In the Oracle RAC Database, if Oracle ASM is selected to manage the shared storage volumes for OCR, voting disk
files, and database files, the ASM instance needs to have write privileges on these devices. The solution is to change
the ownership of these devices from root to the owner of the ASM instance, for example the 'grid' user.
There are two methods to change the proper ownerships in Linux:
Use the Linux udev utility to create udev rules that change the ownership of the devices.
Create ASM disks using ASMLib. The ASM disks will be given a new owner, which can be the
owner of ASM instance like the “grid” user.
Of these two methods, the udev rule method is based on a Linux utility which is available for various versions
of Linux such as Red Hat Enterprise Linux 5.x and 6.x, and Oracle Linux 5.x and 6.x. Oracle ASMLib has been
generally available for both Red Hat Enterprise Linux 5.x and Oracle Linux 5.x. However, for Enterprise Linux 6.x,
ASMLib was initially only available for Oracle Linux 6.x UEK kernel. ASMLib was not available for Oracle Linux 6 Red
Hat-compatible kernel and Red Hat Exterprise Linux 6, until Spring 2013, when Oracle released the rpm packages for
Oracle Linux 6 and Red Hat made the ASMLib kernel package for Red Hat Enterprise Linux 6 (beginning with 6.4). The
dev rules method is the choice if you don't use ASMLib. Let's discuss how to set the udev rules in detail here. ASMLib
will be discussed in the next section.
The following are the steps to create udev rules for the devices:
1.
Get the SCSI ID (WWIDs) for all the devices that will be used for the RAC Database by
using the SCSI script mentioned previously.
2.
Create a udev rule file, for example /etc/udev/rules.d/99-oracle-asmdevices.rules
#------------------------ start udev rule contents ------------------------------------------------
----------#
KERNEL=="dm-*", PROGRAM="scsi_id --page=0x83 --whitelisted
--device=/dev/%k",RESULT=="36842b2b000742679000007a8500b2087", OWNER:="grid", GROUP:="asmadmin"
KERNEL=="dm-*", PROGRAM="scsi_id --page=0x83 --whitelisted
--device=/dev/%k",RESULT=="36842b2b000742679000007a5500b1cd9", OWNER:="grid", GROUP:="asmadmin"
#-------------------------- end udev rule contents ------------------------------------------------
--------#
 
Search WWH ::




Custom Search