当前位置:网站首页>ISCSI详解(五)——ISCSI客户端配置实战
ISCSI详解(五)——ISCSI客户端配置实战
2022-06-12 08:50:00 【永远是少年啊】
今天继续给大家介绍Linux运维相关知识,本文主要内容是ISCSI客户端配置实战。
一、ISCSI客户端安装
在前文ISCSI详解(四)——ISCSI服务端配置实战中,我们配置实现了ISCSI的服务端。今天,我们来配置实现ISCSI的客户端,并且使用ISCSI客户端链接到服务端进行使用。
首先,我们还是先安装EPEL的YUM源,执行命令:
yum install -y epel-release
之后,我们需要安装ISCSI的客户端,执行命令:
yum install -y iscsi-initiator-utils
即可完成安装。
二、ISCSI客户端启动与链接
在完成ISCSI客户端的安装后,我们执行命令:
systemctl start iscsid
来开启ISCSI的客户端。之后,我们执行命令:
iscsiadm -m discovery -t sendtargets -p 192.168.136.11:3260
来连接到ISCSI服务端,该命令执行结果如下所示:
这样,我们就可以成功连接到ISCSI服务端了。
三、ISCSI服务使用
在完成到服务端的链接后,我们执行命令:
tree /var/lib/iscsi/
可以看到当前客户端上存储的服务端信息,如下所示:
之后,我们执行命令:
systemct start iscsi
开启iscsi服务。之后,我们可以看到我们的设备上发现了新的硬盘,如下所示:
这样,我们就可以把该ISCSI硬盘当作一块普通的硬盘来使用了,先执行fdisk命令来进行格式化,过程如下所示:
格式化之后,出现了新的磁盘分区/dev/sdb1,如下所示:
之后,我们对该磁盘分区创建文件系统,如下所示:
最后,我们对该分区进行挂载。之后,我们就可以正常使用了,如下所示:
四、ISCSI磁盘卸载
最后,我们来讲一下对ISCSI磁盘的卸载和重新挂载命令,执行命令:
iscsiadm -m node -T com.pzz.www:target_san1 -u
即可卸载该ISCSI磁盘。(注:上述命令中,com.pzz.www:target_san1为我们在ISCSI配置文件中设置的,也可以在之前的tree命令中查看)该命令执行结果如下所示:
注意,如果要执行ISCSI磁盘的卸载,那么必须要先umount该磁盘。
如果我们想再次挂载使用该磁盘,即可执行命令:
iscsiadm -m node -T com.pzz.www:target_san1 -l
该命令执行结果如下所示:
这样,我们就可以重新使用该磁盘了。
原创不易,转载请说明出处:https://blog.csdn.net/weixin_40228200
边栏推荐
- Display the remaining valid days according to the valid period
- [essence] explain in detail the memory management mechanism in QT
- 进制GB和GiB的区别
- 了结非对称密钥
- Build personal blog and web.
- Application method of new version UI of idea + use method of non test qualification and related introduction
- (node:22344) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permit
- What is the difference between ERP production management and MES management system?
- 正则校验用户名
- 2022.6.11-----leetcode. nine hundred and twenty-six
猜你喜欢

43 cas d'analyse du réseau neuronal MATLAB: chapitre 7 régression du réseau RBF - - réalisation de la régression fonctionnelle non linéaire

The Three Kingdoms kill the surrounding areas -------- explanation of the pig Kingdom kill problem

Background position - mixed units

ctfshow web3

Analysis of 43 cases of MATLAB neural network: Chapter 8 prediction of GRNN Network - Freight Volume Prediction Based on generalized regression neural network

分库分表会带来读扩散问题?怎么解决?

《MATLAB 神经网络43个案例分析》:第8章 GRNN网络的预测----基于广义回归神经网络的货运量预测
![[new planning]](/img/8e/0e15e0f3ee08002eaceea1fe8948ec.jpg)
[new planning]

Inheritance of row height
![[advanced pointer III] implement C language quick sorting function qsort & callback function](/img/f0/3729db83ba3eb15c7df0958858ece9.png)
[advanced pointer III] implement C language quick sorting function qsort & callback function
随机推荐
Background position - mixed units
JVM learning notes: three local method interfaces and execution engines
第六章-包含多个段的程序
JVM学习笔记:三 本地方法接口、执行引擎
Knee joint
When converting tensor to ndarray in tensorflow, the run or Eval function is constantly called in the loop, and the code runs more and more slowly!
Union selector
Knee joint
Error: clear the history in the search box in the website?
Principle and configuration of MPLS
You have an error in your SQL syntax; use near ‘and title=‘xxx‘‘ at line 5
Construction of memcached cache service under Linux:
[open source project] easycmd command graphical software
Engineers learn music theory (III) interval mode and chord
Dynamic segment tree leetcode six hundred and ninety-nine
Gets the number of occurrences of a character in a string
深拷贝与浅拷贝的区别
Engineers learn music theory (II) scale and tendency
FDA reviewers say Moderna covid vaccine is safe and effective for children under 5 years of age
判断对象是否为空