当前位置: 代码迷 >> 综合 >> iSCSI initiator
  详细解决方案

iSCSI initiator

热度:92   发布时间:2024-02-11 10:40:25.0

https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/3/html/block_device_guide/using_an_iscsi_gateway#the_iscsi_initiator_for_red_hat_enterprise_linux

安装

yum install iscsi-initiator-utils
yum install device-mapper-multipath

设置Initiator Name

vim /etc/iscsi/initiatorname.iscsi

InitiatorName=iqn.2020-06.com.bmwaddp.rhv-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               60path_checker           turprio                   aluaprio_args              exclusive_pref_bitfast_io_fail_tmo       25no_path_retry          queue}
}
systemctl reload multipathd

/etc/iscsi/iscsid.conf

...
node.session.auth.authmethod = CHAP
node.session.auth.username = rhv@user01
node.session.auth.password = rhv@pass3128

发现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