Oracle RAC – Configuring udev and device-mapper for ASM

Oracle RAC – Configuring udev and device-mapper for ASM

Since Oracle no longer provides asmlib RPMs for RHEL 6, we will need to take care of that during Oracle RAC installation. The most common way is to use udev rules to ensure the ASM disks permission survives through reboot. If the provided storage does not have a multi-pathing driver like SDDPCM or PowerPath for the OS, then we will need to use RHEL 6 default driver, device-mapper.

  • device-mapper => Default multi-pathing software in RHEL 6
  • udev => Used to create rules for the ASM disks

1. Ensure device-mapper rpm is installed in the system

rpm -qa | grep -i device-mapper*

2. Get the unique SCSI device ID for all the disks

# scsi_id -gud /dev/sd*

3. Create/Edit /etc/multipath.conf file – This configuration needs to be provided by the storage vendor.

RHEL62
 device {
 vendor "IBM"
 product "2145"
 path_grouping_policy group_by_prio
 getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
 features "1 queue_if_no_path"
 prio alua
 path_checker tur
 failback immediate
 no_path_retry "5"
 rr_min_io 1
# polling_interval 30
 dev_loss_tmo 120
 }
blacklist {
 wwid <local_disk>
 devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" 
 devnode "^hd[a-z]" 
 devnode "^dcssblk[0-9]*"
}
defaults {
polling_interval 30 
}
multipaths { 
 multipath {
 wwid 360026b9000618571000008b54ea5360b 
 alias db
 }
}

4. Create the udev rules to ensure the ASM disks permission is set correctly – This is very specific to the version of the Linux. Please verify and test this out.

vi /etc/udev/rules.d/97-oracle-asmdevices.rules
KERNEL=="dm-*", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", OWNER="grid", GROUP="asmadmin", MODE="0660"

5. Ensure device-mapper service is always started.

#chkconfig multipathd on

6. Restart system

#init 6

7. Verify everything

#service --status-all | grep -i multipathd
#ls -al /dev/dm-*

Hope this helps!

Regards,
Wei Shan

Advertisements

One thought on “Oracle RAC – Configuring udev and device-mapper for ASM”

  1. hii..i find ur blog very useful..Thanks for sharing ur experience with us.
    I am using Oracle enterprise linux 6.5 do i need to perform all these steps.
    i was installing RAC 11gR2 on OEL6.5 but getting some errors..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s