Centos7配置使用iscsi(详解)

本文详述了在CentOS7上配置ISCSI的步骤,包括重启和启用target服务,设置防火墙以开放TCP端口,使用targetcli工具创建和发布磁盘,设置ACL与客户端IP绑定。此外,还介绍了客户端如何安装必要工具,命名initiator,启动服务,发现并连接存储,最后验证ISCSI连接的成功。
摘要由CSDN通过智能技术生成
开始之前需要打开两个虚拟机,一个当Server端,一个当Client端。
一、首先在SERVER 端操作。
1、
[root@localhost /]# yum -y install targetd targetcli

2、重启target服务。

[root@localhost /]# systemctl start target

3、启用target服务。

[root@localhost /]# systemctl enable target
Created symlink from /etc/systemd/system/multi-user.target.wants/target.service to /usr/lib/systemd/system/target.service.

4、查看target服务此时的状态。

[root@localhost /]# systemctl status target
● target.service - Restore LIO kernel target configuration
   Loaded: loaded (/usr/lib/systemd/system/target.service; enabled; vendor preset: disabled)
   Active: active (exited) since 四 2022-04-28 20:16:45 CST; 3min 22s ago
 Main PID: 70281 (code=exited, status=0/SUCCESS)

4月 28 20:16:45 localhost.localdomain systemd[1]: Starting Restore LIO kerne...
4月 28 20:16:45 localhost.localdomain target[70281]: No saved config file at...
4月 28 20:16:45 localhost.localdomain systemd[1]: Started Restore LIO kernel...
Hint: Some lines were ellipsized, use -l to show in full.

二、设置防火墙。

1、添加tcp端口号

[root@localhost /]# firewall-cmd --add-port=3260/tcp --permanent
success
  • 3
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值