iscsi_server_client_chap_username_password_targetcli

设置步骤
server 端
1,安装server端软件
2,进入配置软件
3,新增block设备
4,新增iscsi
5,给iscsi新增Lun设备(关联第3不新增的block设备)
6,配置iscsi的权限(认证方式,用户和密码 和登录acls列表)

client端
1,安装client端软件
2,修改initiatorname(server端acls设置)
3,修改认证方式为用户名和密码,重启服务
4,查找iscsi可用设备
5,登录iscsi,格式,挂载

问题:使用匹配登录,不认证的方式,居然只能只读,有知道原因的同学,可以告诉我一下,多谢!

server
[root@k8s-node1 ~]# systemctl start targetd
[root@k8s-node1 ~]# targetcli
Warning: Could not load preferences file /root/.targetcli/prefs.bin.
targetcli shell version 2.1.53
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type ‘help’.

/> ls
o- / … […]
o- backstores … […]
| o- block … [Storage Objects: 0]
| o- fileio … [Storage Objects: 0]
| o- pscsi … [Storage Objects: 0]
| o- ramdisk … [Storage Objects: 0]
o- iscsi … [Targets: 0]
o- loopback … [Targets: 0]
/> cd backstores/fileio
/backstores/fileio> create
file_or_dev= name= size= sparse= write_back= wwn=
/backstores/fileio> create file_or_dev=/home/test name=test size=1G
Created fileio test with size 1073741824
/backstores/fileio> cd /iscsi
/iscsi> create wwn=iqn.2022-06.com.test
Created target iqn.2022-06.com.test.
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260.
/iscsi> cd iqn.2022-06.com.test/tpg1/acls
/iscsi/iqn.20…est/tpg1/acls> create
add_mapped_luns= wwn=
/iscsi/iqn.20…est/tpg1/acls> create wwn=iqn.2022-06.com.test:client
Created Node ACL for iqn.2022-06.com.test:client
/iscsi/iqn.20…est/tpg1/acls> cd …/
…/acls/ …/luns/ …/portals/
/iscsi/iqn.20…est/tpg1/acls> cd …/luns
/iscsi/iqn.20…est/tpg1/luns> create
/backstores/fileio/test anaconda-ks.cfg add_mapped_luns=
lun= storage_object=
/iscsi/iqn.20…est/tpg1/luns> create lun=lun0 storage_object=/backstores/fileio/test
Created LUN 0.
Created LUN 0->0 mapping in node ACL iqn.2022-06.com.test:client
/iscsi/iqn.20…est/tpg1/luns> exit
Global pref auto_save_on_exit=true
Configuration saved to /etc/target/saveconfig.json
[root@k8s-node1 ~]# targetcli
targetcli shell version 2.1.53
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type ‘help’.

/iscsi/iqn.20…est/tpg1/luns> c

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值