安装
yum install iscsi-initiator-utils
yum install device-mapper-multipath
设置Initiator Name
vim /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.2020-06.com.test-client
重启iscsid
systemctl restart iscsid
Configuring Multipath IO
mpathconf --enable --with_multipathd y
/etc/multipath.conf
结尾添加
devices {
device {
vendor "LIO-ORG"
hardware_handler "1 alua"
path_grouping_policy "failover"
path_selector "queue-length 0"
failback 60
path_checker tur
prio alua
prio_args exclusive_pref_bit
fast_io_fail_tmo 25
no_path_retry queue
}
}
systemctl reload multipathd
/etc/iscsi/iscsid.conf
...
node.session.auth.authmethod = CHAP
node.session.auth.username = user
node.session.auth.password = password
发现target
iscsiadm -m discovery -t st -p 节点IP
iscsiadm -m discovery -t st -p 10.127.32.149
10.127.32.149:3260,1 iqn.2003-01.com.redhat.iscsi-gw:ceph-igw
10.127.32.150:3260,2 iqn.2003-01.com.redhat.iscsi-gw:ceph-igw
10.127.32.154:3260,3 iqn.2003-01.com.redhat.iscsi-gw:ceph-igw
登录target
iscsiadm -m node -T iqn.2003-01.com.redhat.iscsi-gw:ceph-igw -l
查看
lsblk
multipath -ll
登出target
iscsiadm -m node -T iqn.2003-01.com.redhat.iscsi-gw:ceph-igw -u