Install and Set Multipath
1yum install device-mapper-multipath
- Check settings in
vim /etc/multipath.conf
:
1defaults {
2user_friendly_names yes
3path_grouping_policy multibus
4}
- add disk in blacklisted and a block
1multipaths {
2 multipath {
3 wwid "36000d310004142000000000000000f23"
4 alias oralog1
5 }
- Special config for some providers. For example, recommended settings for all Clariion/VNX/Unity class arrays that support ALUA:
1 devices {
2 device {
3 vendor "DGC"
4 product ".*"
5 product_blacklist "LUNZ"
6 :
7 path_checker emc_clariion ### Rev 47 alua
8 hardware_handler "1 alua" ### modified for alua
9 prio alua ### modified for alua
10 :
11 }
12 }
Checks config with:
multipathd show config |more
Once
multipath.conf
configured, perform following steps to start multipathd:
1modprobe dm-multipath
2systemctl reload multipathd
3multipath -d # Dry run
4multipath -v2 # Commits configuration
- Get WWID - needed for the FS or UDEV config:
1for i in {b..i}; do /lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sd${i}; done | sort | uniq
2
3for i in {{a..z},{a..z}{a..z}}; do /lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sd${i}; done | sort | uniq
4
5for i in {{a..z},{a..z}{a..z}}; do WWID=$(/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sd${i}); echo "/dev/sd${i} = $WWID"; done | sort -t"=" -k2
6
7for i in {{a..z},{a..z}{a..z}}; do /lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sd${i}; done | sort | uniq -c
8
9udevadm info --query=all --name=/dev/mapper/oradataemc1 | grep -i "DM_UUID"
ALUA
โ ๏ธ for DGC (CLARiiON) or VNX storage arrays - special config due to the fact that “path checker” is optimized for Passive Not Ready (PNR) failover mode 1 and not for ALUA failover mode 4.
- To check if ALUA is active
1# Install
2yum install sg3_utils
3
4# Case where not supported:
5sg_rtpg /dev/sdf
6Report Target Port Groups command not supported
7
8#Cas supported:
9sg_rtpg -vvd /dev/sdf
10open /dev/sdf with flags=0x802
11 report target port groups cdb: a3 0a 00 00 00 00 00 00 04 00 00 00
12 report target port group: pass-through requested 1024 bytes but got 52 bytes
13Report list length = 52
14Report target port groups:
15 target port group id : 0x1 , Pref=0
16 target port group asymmetric access state : 0x01 (active/non optimized)
17 T_SUP : 0, O_SUP : 0, LBD_SUP : 0, U_SUP : 1, S_SUP : 0, AN_SUP : 1, AO_SUP : 1
18 status code : 0x01 (target port asym. state changed by SET TARGET PORT GROUPS command)
19 vendor unique status : 0x00
20 target port count : 04
21 Relative target port ids:
22 0x01
23 0x02
24 0x03
25 0x04
26 target port group id : 0x2 , Pref=1
27 target port group asymmetric access state : 0x00 (active/optimized)
28 T_SUP : 0, O_SUP : 0, LBD_SUP : 0, U_SUP : 1, S_SUP : 0, AN_SUP : 1, AO_SUP : 1
29 status code : 0x01 (target port asym. state changed by SET TARGET PORT GROUPS command)
30 vendor unique status : 0x00
31 target port count : 04
32 Relative target port ids:
33 0x05
34 0x06
35 0x07
36 0x08
Basic Checks
multipath -ll
1 mpath2 (360060e80057110000000711000005405) dm-8 HP,OPEN-V
2 [size=408G][features=1 queue_if_no_path][hwhandler=0][rw]
3 \_ round-robin 0 [prio=2][active]
4 \_ 2:0:1:0 sdc 8:32 [active][ready]
5 \_ 3:0:2:0 sdn 8:208 [active][ready]
6
7Other type of Output :
8WIND9CB0D67 dm-20 HITACHI ,OPEN-V
9size=55G features='1 queue_if_no_path' hwhandler='0' wp=rw
10`-+- policy='service-time 0' prio=1 status=active
11 |- 3:0:1:6 sdal 66:80 active ready running
12 `- 2:0:1:6 sdj 8:144 active ready running
multipathd show paths
1hcil dev dev_t pri dm_st chk_st dev_st next_check
21:0:0:1 sdf 8:80 10 active ready running .......... 3/40
31:0:0:2 sdm 8:192 50 active ready running .......... 3/40
41:0:0:3 sdo 8:224 50 active ready running .......... 3/40
51:0:0:4 sdt 65:48 10 active ready running .......... 3/40
62:0:0:1 sdg 8:96 50 active ready running .......... 3/40
72:0:0:2 sdk 8:160 10 active ready running X......... 4/40
dmsetup info WIND9C50D4C
1Name: WIND9C50D4C
2State: ACTIVE
3Read Ahead: 8192
4Tables present: LIVE
5Open count: 1
6Event number: 0
7Major, minor: 253, 10
8Number of targets: 1
9UUID: mpath-WIND9C50D4C
dmsetup info -c
1Name Maj Min Stat Open Targ Event UUID
2vgdata-local_0rddb_prod 253 76 L--w 1 3 0 LVM-L4zKBVvimtzjKK80DUxiTGZXVYjEufrH6DrZllZR2tw7vtH2D9NJRbC3Jta8QuRO
3vgdata-local_0lucas_prod 253 74 L--w 1 1 0 LVM-L4zKBVvimtzjKK80DUxiTGZXVYjEufrHF8nplAxZfZBkVUP4ndcJvCrNP5UOAfIA
4vgdata-prod_0tris_prod 253 11 L--w 1 3 0 LVM-L4zKBVvimtzjKK80DUxiTGZXVYjEufrHISKMHLqUw4FnG4iKyFiMYsDVmj2i63jF
5vgdata-local_0pestic_test 253 44 L--w 1 1 0 LVM-L4zKBVvimtzjKK80DUxiTGZXVYjEufrHHESnLA5qupQVnfmZw2UiloFM5CtrDecO
dmsetup ls
1ol-var (249:4)
2orafraemc1 (249:7)
3ol-lv_swap (249:6)
4ol-home (249:3)
5ol-opt (249:1)
6oralogemc1 (249:8)
7ol-lv_oracle (249:5)
8ol-root (249:0)
9oradataemc2 (249:9)
10oradataemc1 (249:10)
11ol-tmp (249:2)
dmsetup deps /dev/syno/syno
11 dependencies : (8, 33)
Delete a LUN from multipath
1# Dynamic delete (non-permanent change, so it come back after reboot)
2multipath -f "3600508b4000971cd0001000022fa0000"
3
4# Static delete
5vi /etc/multipath.conf
6
7# Then reload
8systemctl reload multipathd
9
10# Restart to recover a multipath config
11multipath -r
Comments