解决磁盘共享时Could not create NetworkPortal in configFS的问题

我用7.3的虚拟机快照,7.3的镜像在做磁盘共享时,遇到了Could not create NetworkPortal in configFS的问题,下面来解决下:

[root@server ~]# targetcli
targetcli shell version 2.1.fb41
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]
/> /backstores/block create westos:storage1 /dev/vdb1
Created block storage object westos:storage1 using /dev/vdb1.
/> iscsi/ create iqn.2019-05.com.westos:storage1
Created target iqn.2019-05.com.westos:storage1.
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260.
/> iscsi/iqn.2019-05.com.westos:storage1/tpg1/luns create /backstores/block/westos:storage1 
Created LUN 0.
/> iscsi/iqn.2019-05.com.westos:storage1/tpg1/acls create iqn.2019-05.com.westos:key
Created Node ACL for iqn.2019-05.com.westos:key
Created mapped LUN 0.
/> iscsi/iqn.2019-05.com.westos:storage1/tpg1/portals create 172.25.254.224
Using default IP port 3260
Could not create NetworkPortal in configFS
/> cd /iscsi/iqn.2019-05.com.westos:storage1/tpg1/portals/
/iscsi/iqn.20.../tpg1/portals> ls
o- portals ........................................................ [Portals: 1]
  o- 0.0.0.0:3260 ......................................................... [OK]
/iscsi/iqn.20.../tpg1/portals> delete 0.0.0.0 3260
Deleted network portal 0.0.0.0:3260
/iscsi/iqn.20.../tpg1/portals> cd 

/> iscsi/iqn.2019-05.com.westos:storage1/tpg1/portals create 172.25.254.224
Using default IP port 3260
Created network portal 172.25.254.224:3260.
/> exit
Global pref auto_save_on_exit=true
Last 10 configs saved in /etc/target/backup.
Configuration saved to /etc/target/saveconfig.json

在这里插入图片描述在这里插入图片描述
然后再在虚拟机硬件管理的界面给服务器虚拟机添加一块虚拟硬盘:
在这里插入图片描述在这里插入图片描述在这里插入图片描述在这里插入图片描述

  • 客户端测试:
    在这里插入图片描述在这里插入图片描述在这里插入图片描述
  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值