Linux mounted iSCSI Storage disk devices

Source: Internet
Author: User

1,CheckNetwork

[Email protected] ~]# ping-i eth0 11.110.10.138

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

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

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

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

[Email protected] ~]#

[Email protected] ~]# ping-i eth0192.168.180.138

PING 192.168.180.138 (192.168.180.138) from11.110.10.138 eth0:56 (+) 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

[Email protected] ~]#

2,Check if the software is already installed

[[email protected] ~]# Rpm-qa |grep iSCSI

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

[Email protected] ~]#

< All rights reserved. The article agrees to reprint, but the source address must be indicated by means of a link. Otherwise pursue legal liability!>
Original Blog Address: http://blog.csdn.net/mchdba/article/details/46794809
Hara Douglas Fir (MCHDBA)

3,CheckISCSIwhether the service is up and performing at the current level

[[Email protected] ~]# service iSCSI Status

......

4. To establish2a file

[Email protected] ~]# iscsiadm-m iface-iiscsi_eth0--op=new

New Interface Iscsi_eth0 Added

[Email protected] ~]# iscsiadm-m iface-iiscsi_eth1--op=new

New Interface Iscsi_eth1 Added

[Email protected] ~]#

5.EstablishIscsi_eth0and theeht0the mapping relationship.

set up at the same time iscsi_eth1 and the eth1 The mapping Relationship .

You can also edit the Iscsi_eth0 and iscsi_eth1 files directly, and change the iface.net_ifacename=default inside

Iface.net_ifacename=eth0 and Iface.net_ifacename=eth1 can.

[Email protected] ~]# ls/var/lib/iscsi/ifaces/

Iscsi_eth0 iscsi_eth1 iscsi_the0 iscsi_the1

[Email protected] ~]# cd/var/lib/iscsi/ifaces/

[email protected] ifaces]# LL

Total dosage 16

-RW-------1 root root 197 June 16:05 Iscsi_eth0

-RW-------1 root root 197 June 16:06 iscsi_eth1

-RW-------1 root root 197 April 3 19:14 iscsi_the0

-RW-------1 root root 197 April 3 19:14 iscsi_the1

[email protected] 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

[Email protected] ifaces]#

[Email protected] ifaces]# iscsiadm-m iface-i iscsi_eth0--op=update-n iface.net_ifacename-v eth0

Iscsi_eth0 updated.

[Email protected] ifaces]# iscsiadm-m iface-i iscsi_eth0--op=update-n iface.net_ifacename-v eth0

Iscsi_eth0 updated.

[Email protected] ifaces]#

6, RestartiSCSIService

[[Email protected] ifaces]# service iSCSI Restart

Stop iSCSI: [OK]

Starting iSCSI: [OK]

[Email protected] ifaces]#

EqualLogic configuration section

7.ConfigurationEquallogic, mapping aLUNsname isRedhat,size3Gof Space

It's simpler to allocate new disk blocks on the storage access site. No, the storage device comes with a URL that we can visit.

Redhat configuration section

8.doDiscover. To find out what I've seen.Redhatof theLUNs. Because there are two paths. Two rows are displayed.

[Email protected] ifaces]# iscsiadm-mdiscovery-t sendtargets-p 11.110.10.138:3260

Iscsiadm:cannot make connection to 11.110.10.138:connection refused

Iscsiadm:cannot make connection to 11.110.10.138:connection refused

Iscsiadm:cannot make connection to 11.110.10.138:connection refused

Iscsiadm:cannot make connection to 11.110.10.138:connection refused

^ciscsiadm:caught SIGINT, exiting ...

[Email protected] ifaces]#

IP address is the stored IP address

[Email protected] ifaces]# iscsiadm-mdiscovery-t sendtargets-p 11.110.10.22:3260

Iscsiadm:this command would remove Therecord [Iface:default, target:iqn.2001-05.com.equallogic:0- 8a0906-6dac38009-c1b1cac2d434efec-pddata, portal:11.110.10.22,3260],but A session is using it. Logout session then rerun command to remove record.

Iscsiadm:this command would remove Therecord [Iface:default, target:iqn.2001-05.com.equallogic:0- 8a0906-4061f7f09-29d248cfaed54b9d-pddata2, portal:11.110.10.22,3260], but a session is using it. Logout session then Reruncommand to remove record.

11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata

11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-4061f7f09-29d248cfaed54b9d-pddata2

11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-6591f7f09-cf5248cfafa5577e-pddata3

11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata

11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-4061f7f09-29d248cfaed54b9d-pddata2

11.110.10.22:3260,1 iqn.2001-05.com.equallogic:0-8a0906-6591f7f09-cf5248cfafa5577e-pddata3

11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata

11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-4061f7f09-29d248cfaed54b9d-pddata2

11.110.10.22:3260,1 iqn.2001-05.com.equallogic:0-8a0906-6591f7f09-cf5248cfafa5577e-pddata3

11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata

11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-4061f7f09-29d248cfaed54b9d-pddata2

11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-6591f7f09-cf5248cfafa5577e-pddata3

[Email protected] ifaces]#

9.Log onall theiSCSI Session, you can see the last twosuccessfulof theRedhat LUN, hasLog onit worked.

[Email protected] ifaces]# iscsiadm-m node-l

Logging in to [Iface:iscsi_eth1, Target:iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata, PORTAL:11.110.10.22,3260] (multiple)

Logging in to [Iface:iscsi_eth0, Target:iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata, PORTAL:11.110.10.22,3260] (multiple)

Logging in to [Iface:iscsi_the1, Target:iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata, PORTAL:11.110.10.22,3260] (multiple)

Logging in to [Iface:iscsi_the0, Target:iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata, PORTAL:11.110.10.22,3260] (multiple)

Logging in to [Iface:iscsi_eth1, Target:iqn.2001-05.com.equallogic:0-8a0906-4061f7f09-29d248cfaed54b9d-pddata2, PORTAL:11.110.10.22,3260] (multiple)

Logging in to [Iface:iscsi_eth0, Target:iqn.2001-05.com.equallogic:0-8a0906-4061f7f09-29d248cfaed54b9d-pddata2, PORTAL:11.110.10.22,3260] (multiple)

Logging in to [Iface:iscsi_the1, Target:iqn.2001-05.com.equallogic:0-8a0906-4061f7f09-29d248cfaed54b9d-pddata2, PORTAL:11.110.10.22,3260] (multiple)

Logging in to [Iface:iscsi_the0, Target:iqn.2001-05.com.equallogic:0-8a0906-4061f7f09-29d248cfaed54b9d-pddata2, PORTAL:11.110.10.22,3260] (multiple)

Logging in to [Iface:iscsi_eth1, TARGET:IQN.2001-05.COM.EQUALLOGIC:0-8A0906-6591F7F09-CF5248CFAFA5577E-PDDATA3, PORTAL:11.110.10.22,3260] (multiple)

Logging in to [Iface:iscsi_eth0, TARGET:IQN.2001-05.COM.EQUALLOGIC:0-8A0906-6591F7F09-CF5248CFAFA5577E-PDDATA3, PORTAL:11.110.10.22,3260] (multiple)

Logging in to [Iface:iscsi_the1, TARGET:IQN.2001-05.COM.EQUALLOGIC:0-8A0906-6591F7F09-CF5248CFAFA5577E-PDDATA3, PORTAL:11.110.10.22,3260] (multiple)

Logging in to [Iface:iscsi_the0, TARGET:IQN.2001-05.COM.EQUALLOGIC:0-8A0906-6591F7F09-CF5248CFAFA5577E-PDDATA3, PORTAL:11.110.10.22,3260] (multiple)

Login to [Iface:iscsi_eth1, Target:iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata, Portal: 11.110.10.22,3260]successful.

Login to [Iface:iscsi_eth0, Target:iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata, Portal: 11.110.10.22,3260]successful.

Login to [Iface:iscsi_the1, Target:iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata, Portal: 11.110.10.22,3260]successful.

Login to [Iface:iscsi_the0, Target:iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata, Portal: 11.110.10.22,3260]successful.

Login to [Iface:iscsi_eth1, TARGET:IQN.2001-05.COM.EQUALLOGIC:0-8A0906-4061F7F09-29D248CFAED54B9D-PDDATA2, Portal : 11.110.10.22,3260] successful.

Login to [Iface:iscsi_eth0, TARGET:IQN.2001-05.COM.EQUALLOGIC:0-8A0906-4061F7F09-29D248CFAED54B9D-PDDATA2, Portal : 11.110.10.22,3260] successful.

Login to [Iface:iscsi_the1, TARGET:IQN.2001-05.COM.EQUALLOGIC:0-8A0906-4061F7F09-29D248CFAED54B9D-PDDATA2, Portal : 11.110.10.22,3260] successful.

Login to [Iface:iscsi_the0, TARGET:IQN.2001-05.COM.EQUALLOGIC:0-8A0906-4061F7F09-29D248CFAED54B9D-PDDATA2, Portal : 11.110.10.22,3260] successful.

Login to [Iface:iscsi_eth1, TARGET:IQN.2001-05.COM.EQUALLOGIC:0-8A0906-6591F7F09-CF5248CFAFA5577E-PDDATA3, Portal : 11.110.10.22,3260] successful.

Login to [Iface:iscsi_eth0, TARGET:IQN.2001-05.COM.EQUALLOGIC:0-8A0906-6591F7F09-CF5248CFAFA5577E-PDDATA3, Portal : 11.110.10.22,3260] successful.

Login to [Iface:iscsi_the1, TARGET:IQN.2001-05.COM.EQUALLOGIC:0-8A0906-6591F7F09-CF5248CFAFA5577E-PDDATA3, Portal : 11.110.10.22,3260] successful.

Login to [Iface:iscsi_the0, TARGET:IQN.2001-05.COM.EQUALLOGIC:0-8A0906-6591F7F09-CF5248CFAFA5577E-PDDATA3, Portal : 11.110.10.22,3260] successful.

[Email protected] ifaces]#

Ten: Enteriscsiadm-m Sessionto see the currently connectedsession.

[Email protected] ifaces]# iscsiadm-msession

TCP: [Ten] 11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-4061f7f09-29d248cfaed54b9d-pddata2

TCP: [One] 11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-4061f7f09-29d248cfaed54b9d-pddata2

TCP: [11.110.10.22:3260,1IQN.2001-05.COM.EQUALLOGIC:0-8A0906-4061F7F09-29D248CFAED54B9D-PDDATA2]

TCP: [11.110.10.22:3260,1IQN.2001-05.COM.EQUALLOGIC:0-8A0906-6591F7F09-CF5248CFAFA5577E-PDDATA3]

TCP: [11.110.10.22:3260,1IQN.2001-05.COM.EQUALLOGIC:0-8A0906-6591F7F09-CF5248CFAFA5577E-PDDATA3]

TCP: [11.110.10.22:3260,1IQN.2001-05.COM.EQUALLOGIC:0-8A0906-6591F7F09-CF5248CFAFA5577E-PDDATA3]

TCP: [+] 11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-6591f7f09-cf5248cfafa5577e-pddata3

TCP: [3] 11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata

TCP: [4] 11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-4061f7f09-29d248cfaed54b9d-pddata2

TCP: [5] 11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata

TCP: [6] 11.110.10.22:3260,1iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata

TCP: [7] 11.110.10.22:3260,1 Iqn.2001-05.com.equallogic:0-8a0906-6dac38009-c1b1cac2d434efec-pddata

TCP: [8] 11.110.10.22:3260,1iqn.2001-0

Linux mounted iSCSI Storage disk devices

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.