当前位置:网站首页>ISCSI详解(四)——ISCSI服务端配置实战
ISCSI详解(四)——ISCSI服务端配置实战
2022-06-11 17:53:00 【永远是少年啊】
今天继续给大家介绍Linux运维相关知识,本文主要内容是ISCSI服务端配置实战。
一、ISCSI安装
首先,我们来安装ISCSI,在安装ISCSI之前,我们需要先安装EPEL的YUM源,执行命令:
yum install -y epel-release
即可完成安装,之后,我们执行命令:
yum install -y scsi-target-utils
即可完成ISCSI的安装。
二、磁盘分区设置
之后,我们在ISCSI的服务端上,插入一块新的磁盘,如下所示:
这样,我们的设备上就出现了新加入的磁盘/dev/sdb,如下所示:
之后,我们对新插入的/dev/sdb磁盘进行分区,执行命令fdisk,进入磁盘分区交互式页面,并将整个/dev/sdb划分为一个主分区/dev/sdb1,如下所示:
分区完成后的磁盘如下所示:
三、ISCSI配置
接下来,我们就需要进行ISCSI的配置了,我们打开ISCSI的配置文件/etc/tgt/targets.conf,在文件的末尾添加如下内容:
<target com.pzz.www:target_san1>
backing-store /dev/sdb1
initiator-address 192.168.136.11
vendor_id pzz
product_id target_pzz
</target>
完成后的配置文件如下所示:
在上述配置中,com.pzz.www为该上设备域名的倒装,backing-store为用于共享的具体分区,initiator-address为允许访问此设备的IP地址,即我们后面要配置的ISCSI客户端的IP地址,vendor_id为供应商标识符,product_id为产品编号,这两个字段我们可以随意设置。
四、服务启动
在完成配置文件后,我们执行命令:
systemctl start tgtd
即可开启ISCSI服务。ISCSI服务开启后,我们可以看到设备上开始监听3260端口,如下所示:
此时,我们执行命令:
tgt-admin -show
可以查看当前ISCSI服务的具体名称,如下所示:
原创不易,转载请说明出处:https://blog.csdn.net/weixin_40228200
边栏推荐
- 【C】 ATOI function implementation +offsetof implementation + exchange binary odd and even digits
- Sqli labs customs clearance hey hey~
- Intelligent overall legend, legend of wiring, security, radio conference, television, building, fire protection and electrical diagram [transferred from wechat official account weak current classroom]
- "College entrance examination" volume sent to the big model: 442 people put forward 204 tasks to the big model, led by Google
- upload-labs通关未半而中道崩殂
- 如何学习和自学
- 6-6 batch sum (*)
- 網絡安全威脅情報體系
- Talking about telework | community essay solicitation
- Hello go (XI). Go language common standard library I
猜你喜欢
![[not forgetting the original intention and forging ahead] 2021 Zhongchuang Suanli new year conference and anniversary celebration](/img/ae/9a0c300f2dcb03b05d737f14b0955f.jpg)
[not forgetting the original intention and forging ahead] 2021 Zhongchuang Suanli new year conference and anniversary celebration

Test and analysis of tidb write hotspot

sqli-labs通关嘿嘿~
![Spring 2021 daily question [week7 not finished]](/img/93/582608e18bf6d78c552fa9478cdd77.jpg)
Spring 2021 daily question [week7 not finished]

安装mariadb 10.5.7(tar包安装)

Initial egg framework

如何学习和自学

Introduction to social engineering practice

Threejs uses indexeddb cache to load GLB model
![[collect first and use it sooner or later] 100 Flink high-frequency interview questions series (I)](/img/3e/efce1cff81abf395ffc24ac57b05d7.png)
[collect first and use it sooner or later] 100 Flink high-frequency interview questions series (I)
随机推荐
在同花顺上面开股票账户好不好,安不安全?
Spring 2021 daily question [end of week4]
简单理解事件
Tle6389-2g V50's unique pwm/pfm control scheme has a duty cycle of up to 100%, forming a very low differential pressure - keshijin mall
Global and Chinese market of web content management software 2022-2028: Research Report on technology, participants, trends, market size and share
Expérience initiale du moteur de segmentation de l'araignée mariadb
Système d'information sur les menaces à la sécurité des réseaux
Chorus translation
6-7 file read / write operation
TestPattern error
【先收藏,早晚用得到】100个Flink高频面试题系列(二)
Ctfhub SQL Boolean blind annotation
System learning typescript (V) - joint type
Bracket generation ---2022/02/25
SQL报错注入1
Why is the UDP stream set to 1316 bytes
Say no to credit card fraud! 100 lines of code to realize simplified real-time fraud detection
[collect first and use it sooner or later] 49 Flink high-frequency interview questions series (I)
Winter vacation daily question (improvement group) [end of week 4]
7-1 are prime numbers