linux挂载iSCSI失败,求帮助
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux挂载iSCSI失败,求帮助相关的知识,希望对你有一定的参考价值。
挂载步骤:1:检查iscsi rpm包
2:启动iscsi服务并设置开机自启动
3:查找存储对外提供的逻辑卷
4:映射逻辑卷到Linux系统中
5:设置开机自动映射
6:对映射出来的磁盘进行分区
7:分区之后进行格式化
8:挂载分区
具体可以看一下w w w . linuxprobe . com 参考技术A 挂载步骤: 1:检查iscsi rpm包 2:启动iscsi服务并设置开机自启动 3:查找存储对外提供的逻辑卷 4:映射逻辑卷到Linux系统中 5:设置开机自动映射 参考技术B 挂载步骤:
1:检查iscsi rpm包
2:启动iscsi服务并设置开机自启动
3:查找存储对外提供的逻辑卷
4:映射逻辑卷到Linux系统中
5:设置开机自动映射
6:对映射出来的磁盘进行分区
7:分区之后进行格式化
8:挂载分区
具体可以看一下w w w . linuxprobe . com 参考技术C 看看log有什么错误,/var/log/message, /var/log/syslog之类 参考技术D 可能是iqn不符合标准;有没有允许该IP连接?
Linux挂载iscsi网络存储
Linux挂载iscsi网络存储
iscsi网络存储简介
iSCSI
,即Internet SCSI,是IETF制订的一项标准,用于将SCSI数据块映射为以太网数据包。从根本上说,它是一种基于IP Storage理论的新型存储技术,该技术将存储行业广泛应用的SCSI接口技术与IP网络技术相结合,可以在IP网络上构建SAN。简单地说,iSCSI就是在IP网络上运行SCSI协议的一种网络存储技术
iscsi的组成
- iSCSI IniTIator或者iSCSI HBA iSCSI Target 以太网交换机 一台或者多台服务器
主机规划
名称 | IP地址 | 硬件配置 |
---|---|---|
iscsi服务端 | 192.168.100.20 | 1核2G |
iscsi客户端 | 192.168.100.19 | 1核2G |
配置iscsi网络存储挂载
iscsi服务端配置
# 安装iscsi服务端
yum install targetd targetcli -y
# 调用targetcli进行设置
[root@server ~]# targetcli
Warning: Could not load preferences file /root/.targetcli/prefs.bin.
targetcli shell version 2.1.53
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.
/> ls
o- / ........................................................................... [...]
o- backstores ................................................................ [...]
| o- block .................................................... [Storage Objects: 0] # 存放硬盘
| o- fileio ................................................... [Storage Objects: 0] # 存放文件
| o- pscsi .................................................... [Storage Objects: 0]
| o- ramdisk .................................................. [Storage Objects: 0]
o- iscsi .............................................................. [Targets: 0]
o- loopback ........................................................... [Targets: 0]
# 创建iscsi磁盘
/> /backstores/block create idisk1 /dev/sdb # idisk1 自定义共享磁盘名称
Created block storage object idisk1 using /dev/sdb.
/> ls
o- / ........................................................................... [...]
o- backstores ................................................................ [...]
| o- block .................................................... [Storage Objects: 1]
| | o- idisk1 .......................... [/dev/sdb (40.0GiB) write-thru deactivated]
| | o- alua ..................................................... [ALUA Groups: 1]
| | o- default_tg_pt_gp ......................... [ALUA state: Active/optimized]
| o- fileio ................................................... [Storage Objects: 0]
| o- pscsi .................................................... [Storage Objects: 0]
| o- ramdisk .................................................. [Storage Objects: 0]
o- iscsi .............................................................. [Targets: 0]
o- loopback ........................................................... [Targets: 0]
/>
# 创建服务端程序,服务器命名:日期形式:标识符
/> iscsi/ create iqn.2021-11.pip.cc:server
Created target iqn.2021-11.pip.cc:server.
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260.
/> ls
o- / ......................................................................................................................... [...]
o- backstores .............................................................................................................. [...]
| o- block .................................................................................................. [Storage Objects: 1]
| | o- idisk1 ........................................................................ [/dev/sdb (40.0GiB) write-thru deactivated]
| | o- alua ................................................................................................... [ALUA Groups: 1]
| | o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
| o- fileio ................................................................................................. [Storage Objects: 0]
| o- pscsi .................................................................................................. [Storage Objects: 0]
| o- ramdisk ................................................................................................ [Storage Objects: 0]
o- iscsi ............................................................................................................ [Targets: 1]
| o- iqn.2021-11.pip.cc:server ......................................................................................... [TPGs: 1]
| o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
| o- acls ........................ 创建客户端连接器.................................................................... [ACLs: 0]
| o- luns .................... 创建服务卷,存储空间.................................................................... [LUNs: 0]
| o- portals .................................................................................................... [Portals: 1]
| o- 0.0.0.0:3260 ..................................................................................................... [OK]
o- loopback ......................................................................................................... [Targets: 0]
# 创建服务卷,<才能被客户端识别>
/> cd iscsi/iqn.2021-11.pip.cc:server/tpg1/
/iscsi/iqn.20...c:server/tpg1> luns/ create /backstores/block/idisk1 # 创建服务卷
Created LUN 0.
/iscsi/iqn.20...c:server/tpgLinux挂载iscsi网络存储