关键词不能为空

当前您在: 主页 > 英语 >

RHEL 6-ISCSI 红帽linux连接iSCSI存储

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2020-10-31 17:51
tags:5368

但的意思-猴开头的成语

2020年10月31日发(作者:殷元章)


下面我们来看一下在RHEL6.3上如何搭建iscsi- target服务器和客户端如何挂
载.
一、服务端操作
服务端版本:
[root@racscsi home]# uname -r
6.x86_64
[root@racscsi home]# cat etcredhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
安装iscsi server软件包。
用RPM的方式安装。
[root@racscsi home]# rpm -ivh 6.x86_
warning: 6.x86_: Header V3 RSASHA256
Signature, key ID fd431d51: NOKEY
Preparing... #########################################
## [100%]
package 6.x86_64 is already installed
用yum命令安装(需自己配置YUM源)
[root@racscsi home]#yum -y install scsi-target-utils
启动服务并且添加到开机自启动。
[root@racscsi home]# start
Starting SCSI target daemon: [ OK ]
[root@racscsi home]# chkconfig tgtd on
使用fdisk命令创建几个分区,或者通过外部存储映射共享分区。
现在这台服务器已划分好devsdb、 devsdc、 devsdd、 devsde、 devsdf、
devsdg 、devsdh、devsdi分区,用于客户端的挂载
下面我们需要编辑配置文件,并设置下iSCSI Qualified Name
(IQN).
[root@racscsi home]#vim etctgt
在文件末尾添加如下内容
#iqn名字可任意


backing-store devsdb
backing-store devsdc
backing-store devsdd
backing-store devsde
backing- store devsdf
backing-store devsdg
backing-store devsdh
backing-store devsdi
initiator-address 192.168.10.024 #限定 允许访问的客户端地址段或具体
IP
write-cache off #是否开启或关闭快取

重启服务,使修改后的配置生效。
[root@racscsi home]# restart
确定iscsi server是否成功。如果显示如下说明配置iscsi server已经成功。
[root@racscsi home]# tgt-admin --show
Target 1: e:asm
System information:
Driver: iscsi
State: ready
I_T nexus information:
I_T nexus: 1
Initiator: :b363811441a
Connection: 0
IP Address: 192.168.10.212
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00010000


SCSI SN: beaf10
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: IET 00010001
SCSI SN: beaf11
Size: 2147 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: rdwr
Backing store path: devsdb
Backing store flags:
。。。。。。。。。。。。 #中间内容省略
LUN: 8
Type: disk
SCSI ID: IET 00010008
SCSI SN: beaf18
Size: 5369 MB, Block size: 512
Online: Yes


Removable media: No
Prevent removal: No
Readonly: No
Backing store type: rdwr
Backing store path: devsdi
Backing store flags:
Account information:
ACL information:
192.168.10.024
注意:关闭服务端的IPTABLES,以免客户端无法正常访问
二、客户端挂载
客户端需安装的包iscsi-initiator-utils
[root@rac2 home]# rpm -ivh 6.x86_
warning: 6.x86_: Header V3
RSASHA256 Signature, key ID fd431d51: NOKEY
Preparing... #########################################
## [100%]
1:iscsi-initiator-utils ###########################################
[100%]
用yum命令安装(需自己配置YUM源)
[root@rac2 home]#yum -y install iscsi-initiator-utils
启动服务并且添加到开机启动。
[root@rac2 Desktop]# d start
[root@rac2 Desktop]# chkconfig iscsid on
发现服务器端iscsi server的共享分区。
[root@rac2 Desktop]# iscsiadm --mode discovery --type sendtargets --portal
192.168.10.220
192.168.10.220:3260,1 e:asm
已发现
登陆到iscsi server共享的分区。


[root@rac2 Desktop]# iscsiadm -m node -T e:asm -p
192.168.10.220 -l
Logging in to [iface: default, target: e:asm, portal:
192.168.10.220,3260] (multiple)
Login to [iface: default, target: e:asm, portal:
192.168.10.220,3260] successful.
再使用fdisk -l命令查看分区,发现共享出来的分区都已经挂过来了。
[root@rac2 Desktop]# fdisk -l
Disk devsda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectorstrack, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logicalphysical): 512 bytes 512 bytes
IO size (minimumoptimal): 512 bytes 512 bytes
Disk identifier: 0x000586f0
Device Boot Start End Blocks Id System
devsda1 * 1 39 307200 83 Linux
Partition 1 does not end on cylinder boundary.
devsda2 39 549 4096000 82 Linux swap Solaris
Partition 2 does not end on cylinder boundary.
devsda3 549 2611 16567296 83 Linux
Disk devsdb: 2147 MB, 2147483648 bytes
67 heads, 62 sectorstrack, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
Sector size (logicalphysical): 512 bytes 512 bytes
IO size (minimumoptimal): 512 bytes 512 bytes
Disk identifier: 0x00000000
Disk devsdc: 2147 MB, 2147483648 bytes
67 heads, 62 sectorstrack, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes


Sector size (logicalphysical): 512 bytes 512 bytes
IO size (minimumoptimal): 512 bytes 512 bytes
Disk identifier: 0x00000000
Disk devsdd: 2147 MB, 2147483648 bytes
67 heads, 62 sectorstrack, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
Sector size (logicalphysical): 512 bytes 512 bytes
IO size (minimumoptimal): 512 bytes 512 bytes
Disk identifier: 0x00000000
Disk devsde: 10.7 GB, 1 bytes
64 heads, 32 sectorstrack, 10240 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logicalphysical): 512 bytes 512 bytes
IO size (minimumoptimal): 512 bytes 512 bytes
Disk identifier: 0x00000000
Disk devsdf: 10.7 GB, 1 bytes
64 heads, 32 sectorstrack, 10240 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logicalphysical): 512 bytes 512 bytes
IO size (minimumoptimal): 512 bytes 512 bytes
Disk identifier: 0x00000000
Disk devsdg: 10.7 GB, 1 bytes
64 heads, 32 sectorstrack, 10240 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logicalphysical): 512 bytes 512 bytes
IO size (minimumoptimal): 512 bytes 512 bytes
Disk identifier: 0x00000000
Disk devsdh: 5368 MB, 5368709120 bytes


166 heads, 62 sectorstrack, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logicalphysical): 512 bytes 512 bytes
IO size (minimumoptimal): 512 bytes 512 bytes
Disk identifier: 0x00000000
Disk devsdi: 5368 MB, 5368709120 bytes
166 heads, 62 sectorstrack, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logicalphysical): 512 bytes 512 bytes
IO size (minimumoptimal): 512 bytes 512 bytes
Disk identifier: 0x00000000
最后你可以格式化分区,挂载在 本地相应目录。如果要实现开机自动挂载,要在
fstab文件添加记录。
注意添加_netdev参数,要不你在重启iscsi server后,启动时会报错。
示例: devsdb crs ext4 default,_netdev 0 0
补充:
如果在服务端文件配置了用户名密码,比如

backing-store devsdb
initiator-address 192.168.10.024
incoming grid 123@passwd
write-cacheoff

则在客户端 配置文件
需要添加相应的账号和密码
me = grid
rd = 123@passwd
me = grid
rd = 123@passwd


芸怎么读-kip是什么意思


襟怀-厝什么意思


okay-风筝的英文


孤单的英文-补习作文


直接的近义词-咆哮是什么意思


起床英文-春晓的意思


表头是什么-生机近义词


感慨的近义词-八下物理教学视频



本文更新与2020-10-31 17:51,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/435544.html

RHEL 6-ISCSI 红帽linux连接iSCSI存储的相关文章

  • 爱心与尊严的高中作文题库

    1.关于爱心和尊严的作文八百字 我们不必怀疑富翁的捐助,毕竟普施爱心,善莫大焉,它是一 种美;我们也不必指责苛求受捐者的冷漠的拒绝,因为人总是有尊 严的,这也是一种美。

    小学作文
  • 爱心与尊严高中作文题库

    1.关于爱心和尊严的作文八百字 我们不必怀疑富翁的捐助,毕竟普施爱心,善莫大焉,它是一 种美;我们也不必指责苛求受捐者的冷漠的拒绝,因为人总是有尊 严的,这也是一种美。

    小学作文
  • 爱心与尊重的作文题库

    1.作文关爱与尊重议论文 如果说没有爱就没有教育的话,那么离开了尊重同样也谈不上教育。 因为每一位孩子都渴望得到他人的尊重,尤其是教师的尊重。可是在现实生活中,不时会有

    小学作文
  • 爱心责任100字作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文
  • 爱心责任心的作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文
  • 爱心责任作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文