#yum install -y device-mapper-multipath iscsi-initiator-utils
- Check iSCSI initiator name and register it in Storage system
# more /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.1994-05.com.redhat:58889c0d19b
- Discovery and Login iSCSI storage
# iscsiadm -m discovery -t st -p 10.62.50.241
# iscsiadm -m node -o show
# iscsiadm -m node –login
# iscsiadm -m session -o show
# systemctl start multipathd
# systemctl enable multipathd
# cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/
# multipath -F
# multipath -v2
# multipath -ll
mpathb (360060160dc613c0049eb4a6e1f4fe611) dm-4 DGC ,VRAID
size=100G features=’2 queue_if_no_path retain_attached_hw_handler’ hwhandler=’1 alua’ wp=rw
|-+- policy=’service-time 0′ prio=50 status=active
| `- 6:0:0:1 sdf 8:80 active ready running
`-+- policy=’service-time 0′ prio=10 status=enabled
`- 7:0:0:1 sdg 8:96 active ready running
mpatha (360060160dc613c0047eb4a6e1f4fe611) dm-3 DGC ,VRAID
size=100G features=’2 queue_if_no_path retain_attached_hw_handler’ hwhandler=’1 alua’ wp=rw
|-+- policy=’service-time 0′ prio=50 status=active
| `- 7:0:0:0 sde 8:64 active ready running
`-+- policy=’service-time 0′ prio=10 status=enabled
`- 6:0:0:0 sdd 8:48 active ready running
# grep -v ^# /etc/multipath.conf|grep -v ^$
defaults {
polling_interval 10
path_selector “round-robin 0”
path_grouping_policy multibus
uid_attribute ID_SERIAL
prio alua
path_checker readsector0
rr_min_io 100
max_fds 8192
rr_weight priorities
failback immediate
no_path_retry fail
user_friendly_names yes
find_multipaths yes
}
blacklist {
devnode “^cciss!c[0-9]d[0-9]*”
devnode “^vg*”
}
devices {
device {
vendor “EMC ”
product “VNX 5800”
path_grouping_policy multibus
path_checker readsector0
path_selector “round-robin 0”
hardware_handler “0”
failback 5
rr_weight priorities
no_path_retry queue
}
device {
vendor “COMPAQ ”
product “MSA1000 ”
path_grouping_policy multibus
}
}
multipaths {
multipath {
wwid 360060160dc613c0047eb4a6e1f4fe611
alias LUN5
}
multipath {
wwid 360060160dc613c0049eb4a6e1f4fe611
alias LUN6
}
}
# multipath -F
# multipath -ll
LUN6 (360060160dc613c0049eb4a6e1f4fe611) dm-4 DGC ,VRAID
size=100G features=’2 queue_if_no_path retain_attached_hw_handler’ hwhandler=’1 alua’ wp=rw
|-+- policy=’round-robin 0′ prio=50 status=active
| `- 6:0:0:1 sdf 8:80 active ready running
`-+- policy=’round-robin 0′ prio=10 status=enabled
`- 7:0:0:1 sdg 8:96 active ready running
LUN5 (360060160dc613c0047eb4a6e1f4fe611) dm-3 DGC ,VRAID
size=100G features=’2 queue_if_no_path retain_attached_hw_handler’ hwhandler=’1 alua’ wp=rw
|-+- policy=’round-robin 0′ prio=50 status=active
| `- 7:0:0:0 sde 8:64 active ready running
`-+- policy=’round-robin 0′ prio=10 status=enabled
`- 6:0:0:0 sdd 8:48 active ready running
# lsblk
# ls /dev/mapper/ -rlta
total 0
crw——-. 1 root root 10, 236 Jul 27 17:24 control
lrwxrwxrwx. 1 root root 7 Jul 27 17:24 centos-swap -> ../dm-1
lrwxrwxrwx. 1 root root 7 Jul 27 17:24 centos-root -> ../dm-0
lrwxrwxrwx. 1 root root 7 Jul 27 17:24 centos-home -> ../dm-2
drwxr-xr-x. 20 root root 3660 Jul 28 10:49 ..
lrwxrwxrwx. 1 root root 7 Jul 28 10:49 LUN5 -> ../dm-3
lrwxrwxrwx. 1 root root 7 Jul 28 10:49 LUN6 -> ../dm-4
# fdisk /dev/mapper/LUN5
# fdisk /dev/mapper/LUN6