Installation guide

# multipath wants the devmaps presented as meaningful device names
# so name them after their devmap name
SUBSYSTEM!="block", GOTO="end_mpath"
KERNEL!="dm-[0-9]*", ACTION=="add", PROGRAM=="/bin/bash -c '/sbin/lsmod | \
/bin/grep ^dm_multipath'", RUN+="/sbin/multipath -v0 %M:%m"
KERNEL!="dm-[0-9]*", GOTO="end_mpath"
PROGRAM!="/sbin/mpath_wait %M %m", GOTO="end_mpath"
ACTION=="add", RUN+="/sbin/dmsetup ls --target multipath \
--exec '/sbin/kpartx -a -p p' -j %M -m %m"
PROGRAM=="/sbin/dmsetup ls --target multipath --exec /bin/basename -j %M -m %m", \
RESULT=="?*", NAME="%k", SYMLINK="mpath/%c", GOTO="oracle_rules"
PROGRAM!="/bin/bash -c '/sbin/dmsetup info -c --noheadings -j %M -m %m | \
/bin/grep -q .*:.*:.*:.*:.*:.*:.*:part[0-9]*-mpath-'", GOTO="end_mpath"
PROGRAM=="/sbin/dmsetup ls --target linear --exec /bin/basename -j %M -m %m", \
NAME="%k", RESULT=="?*", SYMLINK="mpath/%c", GOTO="oracle_rules"
LABEL="oracle_rules"
RESULT=="asm[0-9]*p1", OWNER="oracle", GROUP="dba", MODE="660", \
RUN+="/bin/chown oracle:dba /dev/mapper/%c; /bin/chmod 660 /dev/mapper/%c"
OPTIONS="last_rule"
LABEL="end_mpath"
On a system with a single path SAN-attached storage you should be able to use udev rules identifying LUNs by
WWID:
# Configure ASM devices
ACTION=="add", KERNEL=="sd*[!0-9]", PROGRAM=="/sbin/scsi_id -g -u -s %p", \
RESULT=="360a98018486f6959684a453333527173", OWNER=”oracle”, GROUP=”dba”, \
MODE=”660”, NAME=”asm1”
Using ASM with ASMLib driver
ASMLib driver is a kernel module providing the ASMLib API to the user space ASM instance for device ac-
cess. The ASM instance can use this API instead of the interface provided by the Linux block or raw devices.
ASMLib requires partitioned ASM devices. The label created on the partitioned device allows ASMLib daemon
to scan and auto-detect ASM devices. It simplifies device management because auto-detection works around the
issue with non-persistent device names. In addition, there is no need to configure permissions on the ASM de-
vices because the ASM instance accesses them via the ASMLib kernel module.
ASMLib requires the installation of the following additional packages:
oracleasm-<KERNEL-VERSION-and RELEASE>
oracleasmlib
oracleasm-support
As you can see, the oracleasm package is specific for the Linux kernel version and release and it needs to be re-
compiled or downloaded from the Oracle repository for each kernel update. This is a trade off for the easier way
to configure ASM devices. System administrators will need to have the corresponding ASMlib driver ready be-
fore applying any kernel upgrades.
On a system with multipathing, the same LUN can be visible as a regular SCSI block device (/dev/sd*) and as a
multipath device (/dev/dm-*). ASMLib should be configured to use only multipath devices. This can be accom-
plished by setting the ASMLib scanning order in the /etc/sysconfig/oracleasm configuration file:
42 | www.redhat.com