ISCSINetworked Storage Services
First, Theoretical Part
ISCSI the concept
ISCSI, or internetscsi, is a standard developed by the IETF for mapping SCSI blocks to Ethernet packets. Fundamentally, it is a new kind of storage technology based on IP Storage theory, which combines SCSI interface technology and IP network technology which is widely used in storage industry , and can be built on IP network. SAN. To put it simply,ISCSI is a networked storage technology that runs the SCSI protocol on an IP network . originally developed by Cisco and IBM Two, ISCSI technology has been supported by a broad range of IP storage technology enthusiasts, and has grown rapidly over the years.
ISCSI is a great choice for small to medium-sized storage networks . First, in terms of technology implementation,ISCSI is a technical standard based on IP protocol, which allows the network to transmit SCSI commands on the TCP/IP protocol , implementing SCSI and TCP/IP protocol, so that users can build a SAN via TCP/IP network , it can easily and quickly transfer and manage information and data with a few investment. before ISCSI, however, the only technology to build a SAN was to use Fibre Channel, which would cost a lot of construction costs, which the average SME could not afford. Secondly,ISCSI technology solves many problems in transmission efficiency, storage capacity, compatibility, openness, security and so on, and never loses to commercial storage systems or fiber-optic storage networks in terms of performance.
the main advantages of iSCSI are: First,iSCSI inherits the TCP/IP protocol, and TCP/IP is the most common and mature protocol in the network, and IP The infrastructure of the network is perfect,and SCSI technology is a storage standard widely used by devices such as disk and tape, which makes iSCSI Construction and maintenance costs very low; second,iSCSI Supports generic Ethernet switches instead of special Fibre Channel switches, which reduces the hassle of heterogeneous networks, and ISCSI is the transport of storage commands over IP packets, so data can be transferred across the Internet , no distance
The restrictions.
Second, Operation Section
s) Experimental Environment
Prepare a ISCSI Server CentOS7 system,IP address 192.168.1.100
One initiator client CentOS7 system,IP address 192.168.1.200
2) Experimental Steps
1. first prepare the ISCSI storage device (which can be a whole disk, a partition, a logical volume, or a RAID array) that is published as a LUN . Here we have /dev/sdb and /dev/sdc.
Cat/proc/partitions
650) this.width=650; "src=" https://s2.51cto.com/wyfs02/M00/8C/C5/wKiom1h3OxTSuYUGAAAihtb12LA785.jpg "style=" float : none; "title=" image001.jpg "alt=" Wkiom1h3oxtsuyugaaaihtb12la785.jpg "/>
2. Install target software
Yum-y Install targetd TARGETCLI
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M00/8C/C1/wKioL1h3OxWw_E_nAAAKBVQ8hNo335.jpg "style=" float : none; "title=" image002.jpg "alt=" Wkiol1h3oxww_e_naaakbvq8hno335.jpg "/>
3. Start target service
Systemctl Enable Targetsystemctl start target
650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M01/8C/C5/wKiom1h3OxXyX1nXAAAnoKkC_Mg786.jpg "style=" float : none; "title=" image003.jpg "alt=" Wkiom1h3oxxyx1nxaaanokkc_mg786.jpg "/>
4. set firewalld firewall to allow 3260 service
Firewall-cmd--premanet--add-prt=3260/tcpfirewall-cmd--reload
650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M01/8C/C1/wKioL1h3OxWiZKuZAAATL72J2E0977.jpg "style=" float : none; "title=" image004.jpg "alt=" Wkiol1h3oxwizkuzaaatl72j2e0977.jpg "/>
5. implement targetcli tools
Targetcli
650) this.width=650; "src=" https://s4.51cto.com/wyfs02/M02/8C/C5/wKiom1h3OxWjfNANAAAkBsVISMg285.jpg "style=" float : none; "title=" image005.jpg "alt=" Wkiom1h3oxwjfnanaaakbsvismg285.jpg "/>
6. Enter help to see the targetcli,LS view structure
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M01/8C/C5/wKiom1h3Oxag5DYuAAA21FFilTs601.jpg "style=" float : none; "title=" image006.jpg "alt=" Wkiom1h3oxag5dyuaaa21ffilts601.jpg "/>
commands supported by the TARGETCLI
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M01/8C/C1/wKioL1h3Oxag7bHLAAAJ4fzCdss384.jpg "style=" float : none; "title=" image007.jpg "alt=" Wkiol1h3oxag7bhlaaaj4fzcdss384.jpg "/>
7. Create a block (to roll up a name for the logic to be published)
/backstores/block Create Server0.disk1/dev/sdb
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M02/8C/C5/wKiom1h3OxazMFOHAAAZX9dr78U423.jpg "style=" float : none; "title=" image008.jpg "alt=" Wkiom1h3oxazmfohaaazx9dr78u423.jpg "/>
can be understood to give /dev/sdb a name for Server0.disk1, give /dev/sdc a name for Server0.disk2
viewing blocks with ls
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M02/8C/C1/wKioL1h3OxaCtFI9AABMlojo-cs523.jpg "style=" float : none; "title=" image009.jpg "alt=" Wkiol1h3oxactfi9aabmlojo-cs523.jpg "/>
8. Create IQN The name is created ISCSI Object
/ISCSI Create Iqn.2017-01.com.benet:disk1
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M00/8C/C5/wKiom1h3Oxfwzb_tAAAue5xwyig433.jpg "style=" float : none; "title=" image010.jpg "alt=" Wkiom1h3oxfwzb_taaaue5xwyig433.jpg "/>
View ISCSI Objects
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M02/8C/C1/wKioL1h3OxeBtdL3AACSYdD8AIY749.jpg "style=" float : none; "title=" image011.jpg "alt=" Wkiol1h3oxebtdl3aacsydd8aiy749.jpg "/>
9. set the ACL to bind the ISCSI object to the client IP or hostname (NOTE: the name that follows is initiator and needs to be set in the client)
/ISCSI/IQN.2017-01.COM.BENET:DISK/TPG1/ACLS Create Iqn.2017-01.com.benet:client
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M00/8C/C5/wKiom1h3OxiSYvf_AAAgzD-cW-4767.jpg "style=" float : none; "title=" image012.jpg "alt=" Wkiom1h3oxisyvf_aaagzd-cw-4767.jpg "/>
10. creating LUNs and binding blocks
/iscsi/iqn.2017-01.com.benet:disk1/tpg1/luns Create/backstores/block/server0.disk1
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M00/8C/C1/wKioL1h3OxuyXd2vAAAmElip0fA014.jpg "style=" float : none; "title=" image013.jpg "alt=" Wkiol1h3oxuyxd2vaaamelip0fa014.jpg "/>
(A ISCSI objects can create multiple LUNs)
perform ls view
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M01/8C/C5/wKiom1h3OxuSo0SQAAC6CizzKQk380.jpg "style=" float : none; "title=" image014.jpg "alt=" Wkiom1h3oxuso0sqaac6cizzkqk380.jpg "/>
11, you can see the portals option in the default boot 0.0.0.0:3260, if you want to enable the specified port can enter the following command
/iscsi/iqn.2017-01.com.benet:disk1/tpg1/portals Create 192.168.1.100 3260
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M00/8C/C1/wKioL1h3OxyzZcKXAAAiIygIP2s002.jpg "style=" float : none; "title=" image015.jpg "alt=" Wkiol1h3oxyzzckxaaaiiygip2s002.jpg "/>
in initiator configuration of the terminal:
1. Install the software
Yum-y Install Iscsi-initlator-utils
2, give initiator a name to enter the following content
Vim/etc/iscsi/initiatorname.iscsi
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M01/8C/C5/wKiom1h3OxywMUPnAAAQL_4p938282.jpg "style=" float : none; "title=" image016.jpg "alt=" Wkiom1h3oxywmupnaaaql_4p938282.jpg "/>
3. start the iSCSI service
Systemctl Enable Iscsisystemctl start iSCSI
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M01/8C/C1/wKioL1h3OxyCeUZgAAATKAEGYrI012.jpg "style=" float : none; "title=" image017.jpg "alt=" Wkiol1h3oxyceuzgaaatkaegyri012.jpg "/>
4. Discovery Storage
Iscsiadm-m discovery-t st-p 192.168.1.100
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M01/8C/C1/wKioL1h3OxzhuHfAAAAaCTEcw2A843.jpg "style=" float : none; "title=" image018.jpg "alt=" Wkiol1h3oxzhuhfaaaaactecw2a843.jpg "/>
5. Log In storage (Note:-l is a connection to iSCSI Target;-u indicates disconnect from iSCSI target)
Iscsiadm-m node-t iqn.2017-01.com.benet:disk1-p 192.168.100-l
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M02/8C/C5/wKiom1h3Ox2QPf3uAAAhuF0N5BI676.jpg "style=" float : none; "title=" image019.jpg "alt=" Wkiom1h3ox2qpf3uaaahuf0n5bi676.jpg "/>
1. Verifying client ISCSI connectivity
Lsscsi
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M02/8C/C5/wKiom1h3Ox2wI2WkAAAVpPkD5Xg534.jpg "style=" float : none; "title=" image020.jpg "alt=" Wkiom1h3ox2wi2wkaaavppkd5xg534.jpg "/>
The rest of the operation is the same as the local hard drive.
This article is from the "Dark Cloud Technology" blog, please be sure to keep this source http://wuyunkeji.blog.51cto.com/12028005/1891489
iSCSI Network Storage Services