cancel
Showing results for 
Search instead for 
Did you mean: 

Mulipathing help

 
Khashru
Valued Contributor

Mulipathing help

I am using Redhat 4.7 on ProLiant BL460c G6. The FC card is Emulex LPe1105-HP 4Gb FC HBA for HP c-Class BladeSystem. This is connected with eva8400. It is working properly. i can see all the LUNs. Is there any tool that allw me to configure the failover policy. In EMC power path something like powermt?
2 REPLIES
Khairy
Esteemed Contributor

Re: Mulipathing help

hi,

you should be able to use multipath. The config is /etc/multipath.conf

By default, the config file with default config should do the work.

# service start multipathd

ensure this service is autostart aft reboot.
# chkconfig multipathd on

start scan possible Luns with multipath access
# multipath -v3

You could refer this doc.

http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01705624/c01705624.pdf?jumpid=reg_R1002_USEN

which are for HP storages.

Rgds

PS : appreciate if you could assign some points.


Re: Mulipathing help

Hi Khasura

I use the following procedure for configuring multipathed devices on RHEL:


Procedure for configuring the system with DM-Multipath:

1. Install device-mapper-multipath rpm
2. Edit the multipath.conf configuration file:
* comment out the default blacklist
* change any of the existing defaults as needed
3. Start the multipath daemons
4. Create the multipath device with the multipath

Install Device Mapper Multipath

# rpm -ivh device-mapper-multipath-0.4.7-8.el5.i386.rpm
warning: device-mapper-multipath-0.4.7-8.el5.i386.rpm: Header V3 DSA signature:
Preparing... ########################################### [100%]
1:device-mapper-multipath########################################### [100%]

Initial Configuration

Set user_friendly_name. The devices will be created as /dev/mapper/mpath[n]. Uncomment the blacklist.

# vim /etc/multipath.conf

#blacklist {
# devnode "*"
#}

defaults {
user_friendly_names yes
path_grouping_policy multibus

}

Load the needed modul and the startup service.

# modprobe dm-multipath
# /etc/init.d/multipathd start
# chkconfig multipathd on

Print out the multipathed device.

# multipath -v2
or
# multipath -v3

Configuration

Configure device type in config file.

# cat /sys/block/sda/device/vendor
HP

# cat /sys/block/sda/device/model
HSV200

# vim /etc/multipath.conf
devices {

device {
vendor "HP"
product "HSV200"
path_grouping_policy multibus
no_path_retry "5"
}
}

Configure multipath device in config file.

# cat /var/lib/multipath/bindings

# Format:
# alias wwid
#
mpath0 3600508b400070aac0000900000080000

# vim /etc/multipath.conf

multipaths {

multipath {
wwid 3600508b400070aac0000900000080000
alias mpath0
path_grouping_policy multibus
path_checker readsector0
path_selector "round-robin 0"
failback "5"
rr_weight priorities
no_path_retry "5"
}
}

Set not mutipathed devices on the blacklist. (f.e. local Raid-Devices, Volume Groups)

# vim /etc/multipath.conf

devnode_blacklist {

devnode "^cciss!c[0-9]d[0-9]*"
devnode "^vg*"
}

Show Configured Multipaths.

# dmsetup ls --target=multipath
mpath0 (253, 1)

# multipath -ll

mpath0 (3600508b400070aac0000900000080000) dm-1 HP,HSV200
[size=10G][features=1 queue_if_no_path][hwhandler=0]
\_ round-robin 0 [prio=4][active]
\_ 0:0:0:1 sda 8:0 [active][ready]
\_ 0:0:1:1 sdb 8:16 [active][ready]
\_ 1:0:0:1 sdc 8:32 [active][ready]
\_ 1:0:1:1 sdd 8:48 [active][ready]

Format and mount Device

Fdisk cannot be used with /dev/mapper/[dev_name] devices. Use fdisk on the underlying disks and execute the following command when device-mapper multipath maps the device to create a /dev/mapper/mpath[n] device for the partition.

# fdisk /dev/sda

# kpartx -a /dev/mapper/mpath0

# ls /dev/mapper/*
mpath0 mpath0p1

# mkfs.ext3 /dev/mapper/mpath0p1

# mount /dev/mapper/mpath0p1 /mnt/san

After that /dev/mapper/mpath0p1 is the first partition on the multipathed device.


Useful Links:
http://thomasvogt.wordpress.com/2007/11/29/linux-san-multipathing/

http://thomasvogt.wordpress.com/2008/02/04/linux-san-multipathing-hp-storage/

Cheers
- Thomas