1.ISCSI,是一个供硬件设备使用的、可在IP协议上层运行的SCSI指令集,是一种开放的基于IP协议的工业技术标准.是直接通过共享硬盘,来提高数据传输的效率

2.服务部署

服务端:

分出一块硬盘,大小为2G

fidsk /dev/vdb    建立vdb1  大小为2G,并同步分区表

ISCSI

安装iscis服务

安装服务并开启服务

yum install targetcli -y
systemctl start target

ISCSI

修改防火墙策略,允许3260通过,永久生效,并且重启火墙服务

ISCSI

对iscis服务进行配置

/> /backstores/block create westos:storage1 /dev/vdb1  
Created block storage object westos:storage1 using /dev/sdb1.
/> iscsi/ create iqn.2017-12.com.example:storage1
Created target iqn.2017-12.com.example:storage1.
Created TPG 1.
/> /iscsi/iqn.2017-12.com.example:storage1/tpg1/acls create iqn.2017-12.com.example:storagekey1
Created Node ACL for iqn.2017-12.com.example:storagekey1
/> /iscsi/iqn.2017-12.com.example:storage1/tpg1/luns create /backstores/block/westos:storage1
Created LUN 0.
Created LUN 0->0 mapping in node ACL iqn.2017-12.com.example:storagekey1
/> /iscsi/iqn.2017-12.com.example:storage1/tpg1/portals create 172.25.254.1
Using default IP port 3260
Created network portal 172.25.254.1:3260.
/> exit
Global pref auto_save_on_exit=true
Last 10 configs saved in /etc/target/backup.
Configuration saved to /etc/target/saveconfig.json

ISCSI

对客户端进行配置

安装服务

ISCSI

编辑服务端配置文件,并将刚才的key写入配置文件

ISCSI

挂载iscis

iscsiadm -m node -T iqn.2017-12.com.example:storage1 -p 172.25.254.1 -l

挂载完成之后可以看到刚才增加的/dev/vdb1硬盘


相关文章:

猜你喜欢
  • 2021-04-08
  • 2021-04-09
相关资源
相似解决方案