网络文件系统——下(iscsi对磁盘设备进行共享)

目录

一、添加设备

二、安装共享策略管理软件

三、使用共享策略管理软件共享设备

四、在客户端的操作

五、删除共享设备

1、删除客户端的共享设备

 2、清空服务器中iscsi共享设备


一、添加设备

  • 列出设备,可以看到现在有两块硬盘 

  •  分区

二、安装共享策略管理软件

[root@westosa100 ~]# dnf install targetcli -y
[root@westosa100 ~]# systemctl enable --now target
Created symlink /etc/systemd/system/multi-user.target.wants/target.service → /usr/lib/systemd/system/target.service.

三、使用共享策略管理软件共享设备

[root@westosa100 ~]# targetcli
Warning: Could not load preferences file /root/.targetcli/prefs.bin.
targetcli shell version 2.1.51
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.

/> /backstores/block create westos_storagel1 /dev/vdb1
Created block storage object westos_storagel1 using /dev/vdb1.
/> /iscsi create iqn.2021-08.org.westos:stragel
Created target iqn.2021-08.org.westos:stragel.
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.2021-08.org.westos:stragel/tpg1/luns create /backstores/block/westos_storagel1 
Created LUN 0.
/> /iscsi/iqn.2021-08.org.westos:stragel/tpg1/acls create iqn.2021-08.org.westos:westoskey
Created Node ACL for iqn.2021-08.org.westos:westoskey
Created mapped LUN 0.
/> exit
Global pref auto_save_on_exit=true
Configuration saved to /etc/target/saveconfig.json

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值