ITPub博客

首页 > 数据库 > Oracle > Config and Use of Device Mapper Multipathing on Oracle Linux (OL)_555603.1

Config and Use of Device Mapper Multipathing on Oracle Linux (OL)_555603.1

Oracle 作者:rongshiyuan 时间:2015-02-28 09:45:19 0 删除 编辑

Configuration and Use of Device Mapper Multipathing on Oracle Linux (OL) (Doc ID 555603.1)


In this Document

Purpose
Scope
Details
  Setting Up The Environment
  Configure device-mapper
  More on DM-MPIO
References

Applies to:

Linux OS - Version Oracle Linux 4.4 to Oracle Linux 5.6 [Release OL4U4 to OL5U6]
Linux x86
Linux x86-64
***Checked for relevance on 31-Tue-2011***
***Checked for relevance on 14-Nov-2012***


Purpose

This document explains the steps in configuring device-mapper multipathing for Oracle Linux (OL) over an example case.

Scope

The steps in this document are generic principally, but they are strictly tested and implemented on OL4 and 5. The procedures are architecture independent.

Details

Setting Up The Environment

To be able to use Device Mapper Multipathing on Oracle Linux (OL) 5, you will need the package device-mapper-multipath installed:

# rpm -q device-mapper-multipath
device-mapper-multipath-0.4.7-12.el5
#

In this document we will be proceeding over an example. Assume that you have two device entries /dev/sda /dev/sdb available:

# fdisk -l
...
...
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
#

where they are actually separate paths to the same disk. To make sure of that (if you need to) you can check it by creating a partition on one of the disks and checking on other. Normally this is not to be done for configuration. Partitioning can be done (and preferred) after device-mapper is configured.

# fdisk /dev/sda
...
...
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-9729, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-9729, default 9729):
Using default value 9729

Command (m for help): p

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        9729    78148161   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
#

Now checking the partitions on both device entries we see the partition created on both of them. Here we are sure that the device entries are paths to the same disk.

# fdisk -l
...
...
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        9729    78148161   83  Linux

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        9729    78148161   83  Linux
#

To proceed now we remove the created partition (as the actual partition creating should be done after configuring device mapper multipath):

# fdisk /dev/sdb
...
...
Command (m for help): d
Selected partition 1

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
#

Checking whether we both have partitionless devicess:

# fdisk -l
...
...
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
#

Next, we can start configuring device-mapper.

Configure device-mapper

To configure the device-mapper, edit the configuration file /etc/multipath.conf

By default all devices are blacklisted. You can disable that completely but if you have many non-multipath devices on the system you can safely blacklist them only in addition to some standard filterouts which exclude IDE devices, RAM disks, raw devices, loop devices, floppy, MD and device-mapper disks, CD/DVD drives, tape drives etc.:

blacklist {
        devnode "^sd[d-g]"                                    # Single-path devices from sdd to sdg
        devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"  
        devnode "^hd[a-z]"
}

and set parameter defaults. Note that there shall be only one defaults clause:

defaults {
         udev_dir /dev
         polling_interval 10
         selector "round-robin 0"
         path_grouping_policy failover
         getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
         prio_callout /bin/true
         path_checker readsector0
         rr_min_io 100
         rr_weight priorities
         failback immediate
         user_friendly_names yes
}

Check whether the device mapper modules are loaded:

# lsmod | grep dm[\-_]round
dm_round_robin         36801  1
dm_multipath           52433  2 dm_round_robin
#

If they are not loaded, load them:

# modprobe dm-multipath
# modprobe dm-round-robin
#

Check for the multipathd service:

# chkconfig --list multipathd
multipathd      0:off   1:off   2:off   3:off   4:off   5:off   6:off
#

If the service is disable as above, enable it:

# chkconfig multipathd on
# chkconfig --list multipathd
multipathd      0:off   1:off   2:on    3:on    4:on    5:on    6:off
#

Start the multipath daemon service:

# service multipathd start
Starting multipathd daemon:                                [  OK  ]
#

Checking for multipathed devices:

# multipath -ll
....
#

For another example of dm mutipathing configuration see Note 605828.1

More on DM-MPIO

For DM-MPIO features see Note 753050.1

References

NOTE:753050.1 - Oracle Linux and External Storage Systems
NOTE:605828.1 - Configuring non-raw multipath devices for Oracle Clusterware 11g (11.1.0, 11.2.0) on RHEL5/OL5
 

Document Details

 
Rate this document Email link to this documentOpen document in new windowPrintable Page
Type:
Status:
Last Major Update:
Last Update:
BULLETIN
PUBLISHED
14-Nov-2013
14-Nov-2013
     
 

Related Products

 
Linux OS
     
 

Information Centers

 
No Information Center available for this document.
     
 

Document References

 
     
 

Recently Viewed

 
     

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

请登录后发表评论 登录
全部评论

注册时间:2009-11-24

  • 博文量
    798
  • 访问量
    3206707