Metlink:How to Configure DM-Multipathing

In this Document
Solution
2. Configure LUNs for ASM:
5. To make the disk available enter the following commands:
8. Ensure that the devices can be seen in /dev/mapper:
10. Setup the ASM parameter (ORACLEASM_SCANORDER), in the file for ASMLIB configuration, /etc/sysconfig/oracleasm, for forcing ASM to bind with the multipath devices


Before being able to configure udev to explicitly name devices, SCSI_ID (scsi_id(8)) should first be configured to return their device identifiers. SCSI commands are sent directly to the device via the SG_IO ioctl interface. Modify the /etc/scsi_id.config file - add or replace the 'option=-b' parameter/value pair (if exists) with 'option=-g', for example:

1b. List all SCSI devices
Using the command SCSI_ID for each /block/a-h (for example, for /dev/sda we type scsi_id -g -s /block/sdb) generates the output:

The two initial SCSI ids represent the local disks (/dev/sda and /dev/sdb). The remaining five represent the SCSI ids of the fibre channel attached LUNs. As a subset of the output string, scsi_id generates for the fibre LUNs matches the World Wide Identifier (WWID). A simple example would be a disk connected to two Fibre Channel ports. Should one controller, port or switch fail, the operating system can route I/O through the remaining controller transparently to the application, with no changes visible to the applications, other than perhaps incremental latency.

1c. Obtain Clusterware device unique SCSI identifiers:

Run the scsi_id(8) command against Clusterware devices from one cluster node to obtain their unique device identifiers. When running the scsi_id(8) command with the -s argument, the device path and name passed should be that relative to sysfs directory /sys/ i.e. /block/ when referring to /sys/block/. Record the unique SCSI identifiers of Clusterware devices - these are required later configuring multipathing, for example:


From the output above, note that multiple devices share common SCSI identifiers. It should now be evident that devices such as /dev/sdh and /dev/sdi refer to the same shared storage device (LUN).

Another command can be used for listing the SCSI identifiers.

1d. Run fdisk to create partitions for ASM disks:
(System Administrator's Task)


MUST run fdisk on respective devices
fdisk /dev/?
Example:


1e. Run the fdisk(8) and/or 'cat /proc/partitions' commands to ensure devices are visible. (If Real Application Clusters (RAC), Clusterware devices are visible on each node.) For example:



2. Configure LUNs for ASM:

(System Administrator's Task)
2a. Verify Multipath Devices:
Once multipathing has been configured and the multipathd service started, the multipathed devices should now be available.

For detailed multipathing commands, please refer to


Update the kernel partition table with the new partition as follow (If Real Application Clusters (RAC), do on each node.):



Then verify that all multipaths are active by executing:




In fact, various device names are created and used to refer to multipathed devices, for example:



# ls -lR /dev|more
/dev:
drwxr-xr-x 3 root root 60 Jun 27 07:17 bus
lrwxrwxrwx 1 root root 4 Jun 27 07:17 cdrom -> scd0
lrwxrwxrwx 1 root root 3 Jun 27 07:17 cdrom-hda -> hda
lrwxrwxrwx 1 root root 4 Jun 27 07:17 cdrom-sr0 -> scd0
lrwxrwxrwx 1 root root 3 Jun 27 07:17 cdrw -> hda
lrwxrwxrwx 1 root root 3 Jun 27 07:17 cdrw-hda -> hda
lrwxrwxrwx 1 root root 3 Jun 27 07:17 cdwriter -> hda
lrwxrwxrwx 1 root root 3 Jun 27 07:17 cdwriter-hda -> hda
crw------- 1 root root 5, 1 Jun 27 07:18 console
lrwxrwxrwx 1 root root 11 Jun 27 07:17 core -> /proc/kcore
drwxr-xr-x 10 root root 200 Jun 27 07:17 cpu
drwxr-xr-x 6 root root 120 Jun 27 07:17 disk
brw-rw---- 1 root root 253, 0 Jun 27 07:17 dm-0
brw-rw---- 1 root root 253, 1 Jun 27 07:17 dm-1
brw-rw---- 1 root root 253, 10 Jun 27 07:17 dm-10
brw-rw---- 1 root root 253, 11 Jun 27 07:17 dm-11
brw-rw---- 1 root root 253, 12 Jun 27 07:17 dm-12
brw-rw---- 1 root root 253, 13 Jun 27 07:17 dm-13
brw-rw---- 1 root root 253, 14 Jun 27 07:17 dm-14
brw-rw---- 1 root root 253, 15 Jun 27 07:17 dm-15
brw-rw---- 1 root root 253, 16 Jun 27 07:17 dm-16
brw-rw---- 1 root root 253, 17 Jun 27 07:17 dm-17
brw-rw---- 1 root root 253, 18 Jun 27 07:17 dm-18
brw-rw---- 1 root root 253, 19 Jun 27 07:17 dm-19
brw-rw---- 1 root root 253, 2 Jun 27 07:17 dm-2
brw-rw---- 1 root root 253, 20 Jun 27 07:17 dm-20
brw-rw---- 1 root root 253, 21 Jun 27 07:17 dm-21
brw-rw---- 1 root root 253, 22 Jun 27 07:17 dm-22
brw-rw---- 1 root root 253, 23 Jun 27 07:17 dm-23
brw-rw---- 1 root root 253, 24 Jun 27 07:17 dm-24
brw-rw---- 1 root root 253, 25 Jun 27 07:17 dm-25
brw-rw---- 1 root root 253, 26 Jun 27 07:17 dm-26
...
/dev/disk/by-label:
lrwxrwxrwx 1 root root 10 Jun 27 07:17 1 -> ../../sda5
lrwxrwxrwx 1 root root 10 Jun 27 07:17 boot1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 27 07:17 optapporacle1 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 27 07:17 SWAP-sda3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 27 07:17 tmp1 -> ../../sda7
lrwxrwxrwx 1 root root 10 Jun 27 07:17 var1 -> ../../sda6

3. Automatic Storage Management Library (ASMLIB) setup:

3a. Verify that ASMLIB has not been installed already before installing (If Real Application Clusters (RAC), run this command on each node):
For example (as root):


3b. Check status (If Real Application Clusters (RAC), run this command on each node):
Failed example:

If status failed ("no" displayed), then:
Configuring the Oracle ASM library driver, for example:



3c. Check status again:

4. Create ASM diskgroups:



4a. Check prior to createdisk command:
4b. After Check, do createdisk command:




5. To make the disk available enter the following commands:


5a. Scan ASM disks:


5b. List ASM disks:


6. Check the ASM diskgroups:
For example (as root) (If Real Application Clusters (RAC), do on each node.):






7. Ensure that the allocated devices can be seen in /dev/mpath:

For example (as root) (f Real Application Clusters (RAC), do on each node.):


8. Ensure that the devices can be seen in /dev/mapper:

For example (as root) (f Real Application Clusters (RAC), do on each node.):


9. Check the device type:

For example (as root) (f Real Application Clusters (RAC), do on each node.):


10. Setup the ASM parameter (ORACLEASM_SCANORDER), in the file for ASMLIB configuration, /etc/sysconfig/oracleasm, for forcing ASM to bind with the multipath devices


10a. Check the file, /etc/sysconfig/oracleasm:


10b. Make a backup of the original file, /etc/sysconfig/oracleasm-_dev_oracleasm


10c. Modify the ORACLEASM_SCANORDER and ORACLEASM_SCANEXCLUDE parameters in /etc/sysconfig/oracleasm:


10d. save file
10e. Restart oracleasm:


10f. Check mulitpath device against /proc/partitions file:


10g. Check mulitpath device against the file, /dev/oracleasm/disks:


10f. Check oracleasm disks again:


Additional Resources

Community Discussions:
Still have questions? Use the above community to search for similar discussions or start a new discussion on this subject.


-----------

ID:1365511.1

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13750068/viewspace-734278/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/13750068/viewspace-734278/

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值