Operating System - Linux
1829456 Members
1330 Online
109992 Solutions
New Discussion

Re: Doubts about device mapper multipath on RHEL5.

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

Doubts about device mapper multipath on RHEL5.

Hi All,

I am new to handling HBA cards in linux.

We have two Qlogic HBA cards each with two ports in one HP server "ProLiant DL380 G6" and running RHEL5.3.

So from OS I am able to see four HBA cards.

# cd /sys/class/fc_host

#ll
total 0
drwxr-xr-x 3 root root 0 Mar 26 11:21 host2
drwxr-xr-x 3 root root 0 Mar 26 11:21 host3
drwxr-xr-x 3 root root 0 Mar 26 11:21 host4
drwxr-xr-x 3 root root 0 Mar 26 11:21 host5

Actually we are going to use this server as backup media server for HP data protector backup environment.

So we have assigned same eight tape drives to host2 and host3. since we need load balancing and fail-over to the tape drives.

I came to know from my backup admin that if we have installed the "Device-mapper-multipath" in linux then it will show only 8 tape drives , otherwise it will show 16 tape drives in linux.

Then I have checked Linux server whether the device-mapper-multipath has been installed.

#rpm -qa | grep -i multipath
device-mapper-multipath-0.4.7-23.el5

Now I came to know that device mapper multipath has been installed in my linux.


So that I am able to see only 8 tape drives instead of 16 tape drives.

# lsscsi
[2:0:0:0] mediumx HP EML E-Series 1373 -
[2:0:1:0] tape HP Ultrium 4-SCSI H58S /dev/st0
[2:0:2:0] tape HP Ultrium 4-SCSI H58S /dev/st1
[2:0:3:0] tape HP Ultrium 4-SCSI H58S /dev/st2
[2:0:4:0] tape HP Ultrium 4-SCSI H58S /dev/st3
[2:0:5:0] tape HP Ultrium 4-SCSI H58S /dev/st4
[2:0:6:0] tape HP Ultrium 4-SCSI H58S /dev/st5
[2:0:7:0] tape HP Ultrium 4-SCSI H58S /dev/st6
[2:0:8:0] tape HP Ultrium 4-SCSI H58S /dev/st7


Now I have some following questions about using multipath in linux:


1)Will it enough just installing device mapper multipath in linux and no other configuration is required to show as single drive if we have assigned them to more than one HBA cards?

2)I heared that there is two type of multipath configurations i)active / passiv (that is one path only is active and other is passive , so that at a time the traffice goes through only one path) ii) active / active (two paths are active so the traffics are going through two paths, it can provide load-balancing and fail-over) , am i correct?


3)what is the default configuration active / passiv or active / active?

4)How to view and change the configuration?

5)Do we need to restart the server after changing the configuration?

10 REPLIES 10
Michal Kapalka (mikap)
Honored Contributor
Solution

Re: Doubts about device mapper multipath on RHEL5.

hi,


at first you could read this docu directly from RedHat :

http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.4/html/DM_Multipath/


mikap
senthil_kumar_1
Super Advisor

Re: Doubts about device mapper multipath on RHEL5.

Hi All,

Could you please answer my questions one by one?
Steven E. Protter
Exalted Contributor

Re: Doubts about device mapper multipath on RHEL5.

Shalom,

1)Will it enough just installing device mapper multipath in linux and no other configuration is required to show as single drive if we have assigned them to more than one HBA cards?

If there is a path multipath will see it, and there will be two paths.

2)I heared that there is two type of multipath configurations i)active / passiv (that is one path only is active and other is passive , so that at a time the traffice goes through only one path) ii) active / active (two paths are active so the traffics are going through two paths, it can provide load-balancing and fail-over) , am i correct?

Yes you are correct.

3)what is the default configuration active / passiv or active / active?

active/passive is the default. With additional configuration you can go active-active.

4)How to view and change the configuration?

5)Do we need to restart the server after changing the configuration?

No.

Note that active/active and multipath might not work with tape drives. Those drives should have their own I/O path and bot share a path with disk. Tape is sequential in nature and probably won't survive a failure, like disk i/o can.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
senthil_kumar_1
Super Advisor

Re: Doubts about device mapper multipath on RHEL5.

Hi Steven,

Still I need more clarification.

1)I have assigned one same LUN to two HBA ports available in same server , normally it will show as two LUNS in OS if "device mapper multipath" package is not installed in linux, am i correct?


2)I have assigned one same LUN to two HBA ports available in same server , it will show as one single LUN in OS if "device mapper multipath" package is installed in linux, am i correct?


3)How to view and change the configuration in device mapper mulitpath?

4)Are you telling that active / active (load-balancing and fail-over) is not possible on tape drives through multipath?
senthil_kumar_1
Super Advisor

Re: Doubts about device mapper multipath on RHEL5.

Could any one pls answer to my questions?
Matti_Kurkela
Honored Contributor

Re: Doubts about device mapper multipath on RHEL5.

1.) Yes, typically the LUNs will be shown as two /dev/sd* devices.

2.) No. It will show as *three* devices: two /dev/sd* devices just as in answer 1, and an additional /dev/mapper/mpathN device (or /dev/mapper/, if you prefer that).

It is conceptually similar to Linux network bonding: two or more ethN or /dev/sd* devices will be accessible together as one bondN or /dev/mapper/mpath* device.

If you want to use the whole set, you use the bondN or /dev/mapper/mpath* device; if you e.g. need to run hardware diagnostics on individual physical connections, you use ethN or /dev/sd*.

3.) See "man multipath" and the well-commented configuration file /etc/multipath.conf.

There is also a DM Multipath Configuration and Administration guide by RedHat:

https://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.5/html/DM_Multipath/index.html

4.) As far as I understand, dm-multipath handles only disk devices, not tape drives.

Because a tape drive is accessible only serially, load balancing is more difficult to do on a tape drive than on a disk drive.

MK
MK
senthil_kumar_1
Super Advisor

Re: Doubts about device mapper multipath on RHEL5.

Hi Matti,

Actually we have assigned one same lun to HBA ports available in one server and device-mapper-multipath rpm has been installed.


As per your thought , there is two device files available under /dev for tape drives and we have to create one bond device file using device mapper multipath (/etc/multipath.conf).


Still i have not configured any thing in /etc/multipath.conf.

First i would like to check your thoughts.

1)Checked whether device mapper multipath installed:

# rpm -qa | grep -i multipath
device-mapper-multipath-0.4.7-23.el5


2)Checked how devices files are available (as per you, there will be two device files):

# ll /dev/st*
crw-rw---- 1 root disk 9, 0 Mar 26 10:15 st0
crw-rw---- 1 root disk 9, 96 Mar 26 10:15 st0a
crw-rw---- 1 root disk 9, 32 Mar 26 10:15 st0l

Does it mean as single device file for one HBA port?


3)Checked in /proc/scsi/scsi

# more /proc/scsi/scsi
Attached devices:
Host: scsi2 Channel: 00 Id: 01 Lun: 00
Vendor: HP Model: Ultrium 4-SCSI Rev: H58S
Type: Sequential-Access ANSI SCSI revision: 05


As per above output , this tape drive are coming through host2 (it is my first HBA port)?


4)Checked in /sys/class/scsi_tapes

# /sys/class/scsi_tapes

# ll

drwxr-xr-x 2 root root 0 Mar 31 10:47 nst0
drwxr-xr-x 2 root root 0 Mar 26 10:15 nst0a
drwxr-xr-x 2 root root 0 Mar 26 10:15 nst0l
drwxr-xr-x 2 root root 0 Mar 26 10:38 st0
drwxr-xr-x 2 root root 0 Mar 26 10:15 st0a
drwxr-xr-x 2 root root 0 Mar 26 10:15 st0l
drwxr-xr-x 2 root root 0 Mar 26 10:15 st0m


# cd st0
#ll
lrwxrwxrwx 1 root root 0 Mar 26 10:15 device -> ../../../devices/pci0000:00/0000:00:08.0/0000:0a:00.0/host2/rport-2:0-6/target2:0:1/2:0:1:0


#cd nst0
#ll
lrwxrwxrwx 1 root root 0 Mar 26 10:15 device -> ../../../devices/pci0000:00/0000:00:08.0/0000:0a:00.0/host2/rport-2:0-6/target2:0:1/2:0:1:0


why here it is showin two names for tape drives.

My Questions:

A)Please explain clearly me your answer for my question 2 in your previous reply using above outputs?


B)Still I need some more info in step by step about how to configure multipath?



Michael Leu
Honored Contributor

Re: Doubts about device mapper multipath on RHEL5.

The devices you show in 4) are all the same drive, only with different modes.

See chapter SYSFS SUPPORT
http://www.kernel.org/doc/Documentation/scsi/st.txt
Tim Nelson
Honored Contributor

Re: Doubts about device mapper multipath on RHEL5.

I think Matti's note applies to your last question
>>4.) As far as I understand, dm-multipath handles only disk devices, not tape drives.

>>Because a tape drive is accessible only serially, load balancing is more difficult to do on a tape drive than on a disk drive.

multipath device names should not be used for the tape device. pick one path, /dev/stX, and only use it..


Matti_Kurkela
Honored Contributor

Re: Doubts about device mapper multipath on RHEL5.

A)
The DM-multipath documentation I linked in my previous reply does not say *anything at all* about using it with tape drives.

I see no evidence of multi-path tape devices here:

drwxr-xr-x 2 root root 0 Mar 31 10:47 nst0
drwxr-xr-x 2 root root 0 Mar 26 10:15 nst0a
drwxr-xr-x 2 root root 0 Mar 26 10:15 nst0l
drwxr-xr-x 2 root root 0 Mar 26 10:38 st0
drwxr-xr-x 2 root root 0 Mar 26 10:15 st0a
drwxr-xr-x 2 root root 0 Mar 26 10:15 st0l
drwxr-xr-x 2 root root 0 Mar 26 10:15 st0m

All these device names refer to a regular single path to a single physical tape device "st0", using various modes.

The prefix letter "n" means "no rewind": in other words, the kernel does not rewind the tape unless the application specifically requests it. This allows things like adding a new backup session after an old one, if the tape has enough capacity for multiple sessions.

If a program uses a tape device that does not have the "n" prefix, the kernel will automatically rewind the tape after the program closes the device file. This makes the tape device behave somewhat like a regular file, so some programs might be able to use a tape device instead of a regular file with no special programming.

But mostly this feature is just a piece of Unix legacy: all the tape backup applications will usually want to use the "/dev/nstN" devices.

The meaning of suffix letters "a", "l" and "m" is somewhat hardware-dependent: the traditional use is for selecting the data writing density, if you e.g. want to use a newer tape drive model to write a tape that must be readable using an older, lower-capacity drive.

The device names without any suffix letter will use the "best" mode of the tape drive for writing, and will usually (try to) auto-detect the correct mode for reading.

If the program using the devices is designed to use tape drives, it can override the defaults associated with the device name prefix/suffix letters, by using tape-specific ioctl system functions. These functions may include rewinding and fast-forwarding the tape, querying and setting the tape writing density, and other functions. Michael's link contains a list of these functions if you're interested.

MK
MK