ASM Devices On RHEL PDF
ASM Devices On RHEL PDF
2
ASMLib consists of the following components:
● kmod-oracleasm
An open source (GPL) kernel module package
● oracleasm-support
An open source (GPL) utilities package
● oracleasmlib
A closed source (proprietary) library package
3
ASMLib Pros
Note: Red Hat Enterprise Linux kernel 2.6.X supports optimized direct
and async I/O for all supported filesystem EXT3/4, XFS, GFS and NFS.
4
ASMLib Cons
5
ASMlib on RHEL 6.4
6
UDEV - Userspace Device Management
7
UDEV - Introduction
8
UDEV in RHEL 6 – What you need to know
9
UDEV – Rules
Source: /usr/share/doc/udev-147/writing_udev_rules/index.html
10
UDEV – ASM Example Rule:
● Match first partition on any SCSI disk attached to the SCSI bus:
KERNEL=="sd?1", BUS=="scsi"
● Execute this program: PROGRAM=="/sbin/scsi_id --whitelisted --replace-
whitespace /dev/$parent"
● If the scsi_id returns: RESULT=="1ATA_OCZ-NOCTI_OCZ-
G0L319451R4Z671G"
● Create /dev/asm-disk1, owned by oracle:dba 0660:
NAME="asm-disk1", OWNER="oracle", GROUP="dba", MODE="0660"
11
UDEV – Identifying Storage
● scsi_id can always be used to generate a match key, but it might
not be the best option.
● /lib/udev/rules.d/60-persistent-storage.rules collects the WWIDs
for any attached storage.
● For performance reasons, consider creating rules that run after
60-*, and reference ENV{ID_SERIAL} or ENV{DM_UUID} instead
of querying the storage a second time.
● SCSI devices can be identified by ENV{ID_SERIAL}
● dm-multipath devices can be identified by ENV{DM_UUID}
● Query via:
12
UDEV: Simple SCSI Example
13
1) Query the storage
Returns:
E: ID_SERIAL=OCZ-NOCTI_OCZ-G0L319451R4Z671G
E: ID_SERIAL_SHORT=OCZ-G0L319451R4Z671G
14
2) Create a Rule
● Create /etc/udev/rules.d/99-oracle-asmdevices.rules,
and add the rule(s) for any current or added ASM
storage.
Note: for each device, replace wwid w/ the output from udevadm
15
3) Test/Apply your Rule
# ls -lh /dev/asm-disk1
brw-rw----. 1 oracle dba 8, 17 Mar 11 20:56 /dev/asm-disk1 -> /dev/sdb1
16
UDEV – Repeatable Process for Adding Storage
17
UDEV: Simple Device-Mapper-Multipath Example
18
1) Identify and Query the storage
19
2) Create a Rule
● Note: for each device, replace %wwid w/ the output from udevadm
● SYMLINK is not required if it's desired to change permissions directly on the dm-*
device.
20
3) Test/Apply your Rule
# ls -lh /dev/asm-disk2
brw-rw----. 1 oracle dba 8, 17 Mar 11 20:56 /dev/asm-disk2 -> /dev/dm-2
21
UDEV Tips
22
Available Resources
ASMlib on RHEL 6:
https://access.redhat.com/knowledge/solutions/315643
23
24