1. 安装软件包
yum -y install iscsi-initiator-utils
2. 配置发起端(客户端)
vi /etc/iscsi/initiatorname.iscsi
修改如下内容
# change to the same IQN you set on the iSCSI target server
InitiatorName=iqn.2014-07.world.srv:www.srv.world
3. 配置认证方式等
vi /etc/iscsi/iscsid.conf
修改如下内容
# line 57: uncomment
node.session.auth.authmethod = CHAP
# line 61,62: uncomment and specify the username and password you set on the iSCSI target server
node.session.auth.username = username
node.session.auth.password = password
4. 发现目标端(服务器)
iscsiadm -m discovery -t sendtargets -p 10.0.0.30
5. 确认详细信息
iscsiadm -m node -o show
6. 登录
iscsiadm -m node -T [ targetaddress ] --login
7. 查看分区信息
cat /proc/partitions
有时可能需要重载target,执行如下命令:
iscsiadm -m node -T [targetaddress] -R