Linux 挂载iscsi存储磁盘设备

本文详细介绍了在Linux环境下,如何检查网络、安装iscsi软件、启动服务、建立iSCSI接口映射、配置Equallogic存储、做discover、登录iscsi session、查看session状态、配置MPIO服务、重启服务以及挂载新磁盘的过程。通过这些步骤,成功地将一个3G的LUN挂载到系统中。
摘要由CSDN通过智能技术生成

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

 

1,check网络

[root@localhost ~]# ping -I eth0 11.110.10.138

PING 11.110.10.138 (11.110.10.138) from 11.110.10.138eth0: 56(84) bytes of data.

64 bytes from 11.110.10.138: icmp_seq=1ttl=64 time=0.023 ms

64 bytes from 11.110.10.138: icmp_seq=2ttl=64 time=0.016 ms

64 bytes from 11.110.10.138: icmp_seq=3ttl=64 time=0.018 ms

^C

--- 11.110.10.138 ping statistics ---

3 packets transmitted, 3 received, 0%packet loss, time 2186ms

rtt min/avg/max/mdev =0.016/0.019/0.023/0.003 ms

[root@localhost ~]#

 

 

 

[root@localhost ~]# ping -I eth0192.168.180.138

PING 192.168.180.138 (192.168.180.138) from11.110.10.138 eth0: 56(84) bytes of data.

From 11.110.10.138 icmp_seq=2 DestinationHost Unreachable

From 11.110.10.138 icmp_seq=3 DestinationHost Unreachable

From 11.110.10.138 icmp_seq=4 DestinationHost Unreachable

^C

--- 192.168.180.138 ping statistics ---

4 packets transmitted, 0 received, +3errors, 100% packet loss, time 3729ms

pipe 3

[root@localhost ~]#

 

 

2,检测软件是否已经安装

[root@localhost ~]# rpm -qa |grep iscsi

iscsi-initiator-utils-6.2.0.873-2.0.2.el6.x86_64

[root@localhost ~]#

 

 <版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!> 
原博客地址:  http://blog.csdn.net/mchdba/article/details/46794809
原作者:黄杉 (mchdba)

3,检查ISCSI服务是否启动了和当前级别下的运行情况

[root@localhost ~]# service iscsi status

......

 

 

 

 

 

4,要建立2个文件

[root@localhost ~]# iscsiadm -m iface -Iiscsi_eth0 --op=new

New interface iscsi_eth0 added

[root@localhost ~]# iscsiadm -m iface -Iiscsi_eth1 --op=new

New interface iscsi_eth1 added

[root@localhost ~]#

 

 

5.建立iscsi_eth0和eht0的映射关系。同时建立iscsi_eth1和eth1的映射关系.

也可以直接编辑iscsi_eth0和iscsi_eth1文件,把里面的iface.net_ifacename=default改成

iface.net_ifacename=eth0和iface.net_ifacename=eth1即可。

[root@localhost ~]# ls/var/lib/iscsi/ifaces/

iscsi_eth0 iscsi_eth1  iscsi_the0  iscsi_the1

[root@localhost ~]# cd/var/lib/iscsi/ifaces/

[root@localhost ifaces]# ll

总用量 16

-rw------- 1 root root 197 6月  10 16:05 iscsi_eth0

-rw------- 1 root root 197 6月  10 16:06 iscsi_eth1

-rw------- 1 root root 197 4月   3 19:14 iscsi_the0

-rw------- 1 root root 197 4月   3 19:14 iscsi_the1

[root@localhost ifaces]# cat iscsi_eth0

# BEGIN RECORD 6.2.0-873.2.el6

iface.iscsi_ifacename = iscsi_eth0

iface.transport_name = tcp

iface.vlan_id = 0

iface.vlan_priority = 0

iface.iface_num = 0

iface.mtu = 0

iface.port = 0

# END RECORD

[root@localhost ifaces]#

[root@localhost ifaces]# iscsiadm -m iface-I iscsi_eth0 --op=update -n iface.net_ifacename -v eth0

iscsi_eth0 updated.

[root@localhost ifaces]# iscsiadm -m iface-I iscsi_eth0 --op=update -n iface.net_ifacename -v eth0

iscsi_eth0 updated.

[root@localhost ifaces]#

 

 

 

6,重启iscsi服务

[root@localhost ifaces]# service iscsi restart

停止 iscsi:                                              [确定]

正在启动 iscsi:                                           [确定]

[root@localhost ifaces]#

 

Equallogic配置部分

 

7.配置Equallogic,映射一个Lun名字为redhat,大小3G的空间

在存储访问网站上,去分配新的磁盘块,

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值