How to Cleanup Multipathing

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to Cleanup Multipathing
# 1  
Old 06-22-2011
How to Cleanup Multipathing

I have a server running redhat 5.5 and it has one SAN device presented to it as LUN9. How can I clean up the remaining entries. I cannot afford to interupt the service. Please assist.

Code:
[root@whatever_server device]# multipath -l
mpath0 (36000097000019260298953666633436) dm-11 EMC,SYMMETRIX
[size=40G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=0][active]
 \_ 2:0:0:9     sda 8:0   [active][undef]
 \_ 3:0:0:9     sdb 8:16  [active][undef]
 \_ 2:0:0:32777 sdc 8:32  [active][undef]
 \_ 2:0:0:32793 sdd 8:48  [active][undef]
 \_ 3:0:0:32777 sde 8:64  [active][undef]
 \_ 3:0:0:32793 sdf 8:80  [active][undef]
 \_ 2:0:0:36873 sdg 8:96  [active][undef]
 \_ 2:0:0:36889 sdh 8:112 [active][undef]
 \_ 3:0:0:36873 sdi 8:128 [active][undef]
 \_ 3:0:0:36889 sdj 8:144 [active][undef]
 \_ 2:0:0:40969 sdk 8:160 [active][undef]
 \_ 2:0:0:40985 sdl 8:176 [active][undef]
 \_ 3:0:0:40969 sdm 8:192 [active][undef]
 \_ 3:0:0:40985 sdn 8:208 [active][undef]
 \_ 2:0:0:45065 sdo 8:224 [active][undef]
 \_ 3:0:0:45065 sdp 8:240 [active][undef]
 \_ 2:0:0:45081 sdq 65:0  [active][undef]
 \_ 3:0:0:45081 sdr 65:16 [active][undef]


Last edited by pludi; 06-22-2011 at 10:41 AM..
# 2  
Old 06-22-2011
Quote:
Originally Posted by Tirmazi
How can I clean up the remaining entries.
In short: you can't.

Long version: The different sd<x> devices represent different views on the same disk over different paths (hence *multi*-path). Usually you don't use these (because every one of them represents one single connection to the disk) but the multipath-device.

Your actual problem probably is that the additional devices mess up your LVM2 configuration. This is taken care of the following way:

The first layer to deal with the LUNs from SAN is the multipath-software. Make sure you give meaningful alias names in "/etc/multipath.conf". That makes administration a lot easier. I use <vgname>pv<nr> (like: "myvgpv01", "myvgpv02", etc.) for the disks. "/etc/multipath.conf" looks like:

Code:
[...]
multipaths {
        #----------------- [dbvg Start] ----------------------
        multipath {
                wwid                    360050768018200878000000000000108
                alias                   dbvgpv01
        }
        multipath {
                wwid                    360050768018200878000000000000140
                alias                   dbvgpv02
        }
        #----------------- [dbvg End] -------------------------
        #----------------- [appvg Start] ----------------------
       multipath {
                wwid                    360050768018200878000000000000149
                alias                   appvgpv01
        }
        #----------------- [appvg End] ------------------------
}
[...]

This will create these disk aliases and the respective udev rules should create device mappings in "/dev/mpath" like this:

Code:
root@host # ls -l /dev/mpath
total 0
lrwxrwxrwx 1 root root 8 Jun 20 12:31 dbvgpv01 -> ../dm-13
lrwxrwxrwx 1 root root 8 Jun 20 12:31 dbvgpv01p1 -> ../dm-21
lrwxrwxrwx 1 root root 8 Jun 20 12:31 dbvgpv02 -> ../dm-14
lrwxrwxrwx 1 root root 8 Jun 20 12:31 dbvgpv02p1 -> ../dm-20
lrwxrwxrwx 1 root root 8 Jun 20 12:31 appvgpv01 -> ../dm-11
lrwxrwxrwx 1 root root 8 Jun 20 12:31 appvgpv01p1 -> ../dm-17
[...]

After getting this to work you have to configure the LVM2 by creating a filter-rule and a directory to look for possible PVs. The configuration file is "/etc/lvm/lvm.conf":

Code:
[...]

devices {
    [...]
    # An array of directories that contain the device nodes you wish
    # to use with LVM2. "/dev" is for the local disk(s) /dev/sda, /dev/sdb,
    # etc., "/dev/mpath" is for the SAN disks

    scan = [ "/dev", "/dev/mpath" ]

    # filter rules are basically regexps. "a|" means "accept", "r|" means "remove".
    # The rules in detail:
    # "r/.*/" removes every device not explicitly allowed by the rules before
    #
    # "a|vg[0-9]*pv[0-9]*|" my VG names always end in "vg", sometimes followed by a number
    # allow everything ending in "vg" or "vg<nr>" followed by "pv<nr>" like
    # "appvgpv01" or "db5vgp03", etc.
    #
    # "a|sd[ab]$|", "a|sd[ab][1-9]*$|" allows "/dev/sda" or "/dev/sdb",
    # both optionally followed by a number (/dev/sda1), but NOT a
    # character. This filters out "/dev/sdaa" and similar devices.

    filter = [ "a|vg[0-9]*pv[0-9]*|", "a|sd[ab]$|", "a|sd[ab][1-9]*$|", "r/.*/" ]

    [...]
}

You should by now be able to use "pvscan"/"vgscan" to find your VGs and LVM2 should exclusively make use of the multipath devices.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 3  
Old 06-22-2011
How about if I do the following will it clean up the stale LUN's

#echo 1 > /sys/block/sdc/device/delete
through
#echo 1 > /sys/block/sdr/device/delete
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Verify multipathing

I have a couple of questions regarding multipath. If I do vgdisplay vg01, I see it is using 1 PV: /dev/dm-13 If I type multipath -ll I see dm-9, dm-10, dm-11, dm-12, but do not see dm-13. Is my vg01 multipathed? How can I actually know for sure? Secondly, let's say this time vg01 says... (1 Reply)
Discussion started by: keelba
1 Replies

2. AIX

Problems setting up multipathing

What is the following output telling me? fget_config -Av ---dar0--- User array name = 'BSNorth-DS4300' dac3 ACTIVE dacNONE ACTIVE Disk DAC LUN Logical Drive hdisk4 dac3 0 TestDiskForAll ---dar1--- User array name = 'BSNorth-DS4300' dac2 ACTIVE dacNONE ACTIVE Disk DAC ... (0 Replies)
Discussion started by: petervg
0 Replies

3. Linux

Linux multipathing issue...

Hi folks. When issuing a multipath -ll on my server, i see something that is bugging me... # multipath -ll 2000b0803ce002582 dm-10 Pillar,Axiom 600 size=129G features='0' hwhandler='0' wp=rw |-+- policy='round-robin 0' prio=50 status=active | |- 0:0:0:4 sdd 8:48 active ready running... (0 Replies)
Discussion started by: Stephan
0 Replies

4. AIX

Multipathing in AIX

Hi, I know the concept of multipathing, but would like to know how to configure multipathing in AIX. or software/driver is by default present in AIX?????? How to find out wheather multipathing is configured in AIX????? Regards, Manu (4 Replies)
Discussion started by: manoj.solaris
4 Replies

5. Solaris

Multipathing - problem

Hello, I turned on the server multipathing: # uname -a SunOS caiman 5.10 Generic_141444-09 sun4v sparc SUNW,T5140 stmsboot -D fp -e And after a reboot the server, multipathing is not enable: # stmsboot -L stmsboot: MPxIO is not enabled stmsboot: MPxIO disabled # ls /dev/dsk... (4 Replies)
Discussion started by: bieszczaders
4 Replies

6. Solaris

Solaris multipathing

Hai we using emc storage which is conneted to M5000 through san switch. we asign 13 luns but in server it is showing 22 luns. i enable the solaris multipathing (MPxIO) #more /kernel/drv/fp.conf in that file MPxio-disable=no #mpathadm list lu it shows ... (2 Replies)
Discussion started by: joshmani
2 Replies

7. Solaris

Veritas Multipathing problem.

Hi, Basically the original configuration on my Solaris 9 server was two LUNs configured as Veritas file systems that were connected to a NetApp filer (filer1). These two LUNs are still configured on the server - but are not being used. They are there as a backup just in case the new... (0 Replies)
Discussion started by: sparcman
0 Replies

8. IP Networking

Assigning a vertual IP and doing IP multipathing...

Hii Every One, I am working on SUN server installed with Solaris-10, 1) I want to assign a vertual IP to a interface (ce1). 2) And with that vertual IP and one more interface (ce2), I want to do IP multipathing. So, kindely help me to achive above tasks by discribing... (2 Replies)
Discussion started by: prashantshukla
2 Replies

9. Solaris

Solaris IP Multipathing

Hi, I saw your post on the forums about how to setup IP multipathing. I wanted your help on the below situation . I have 2 servers A and B . Now they should be connected to 2 network switches . S1 and S2. Now is it possible to have IP Multipathing on each of the servers as follows ? ... (0 Replies)
Discussion started by: maadhuu
0 Replies

10. Solaris

solaris multipathing

I have solaris 10 sparc. I installed a Qlogic hba card. This card is connected on a brocade switch and the brocade is connected on 2 different controllers on a Hitachi disk bay. I formated 2 luns. On my solaris system, i have 4 disk. How to configure solaris 10 to fix the dual disk view. ... (4 Replies)
Discussion started by: simquest
4 Replies
Login or Register to Ask a Question