Implementing iSCSI shared storage under Linux systems

Source: Internet
Author: User

implementing iSCSI shared storage under Linux systems

iSCSI Introduction:iSCSI is a block-level share of SCSI packets based on TCP/IP transport encapsulation, which is also the C/S architecture model, and the server side provides the storage devices required by the client. The client only needs to mount it as a storage device on its own host to partition and format it .

Implement iSCSI 2 characters required:

iSCSI target (server)

where the storage resource resides iSCSI the server is called "target". iSCSI target is typically a hard disk storage device. Most of the current operating systems provide client software initiator that are used in conjunction with iSCSI Target.

iSCSI Initiator (client)

Initiator is iSCSI the service side of the transport. A typical initiator has a common purpose, as an adapter for an iSCSI Bus, instead of a physical SCSI device (like a hard disk or tape). ISCSI initiator transmits SCSI commands over an IP network.

Experimental environment

192.168.1.123 CentOS 6. 7 x86_64 Target Server

192.168.1.124 CentOS 6. 7 x86_64 Initiator Client

Experimental steps:

A. Deploy target server

1) First in Target Server add a new hard disk on the Setting up the iSCSI target Environment

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/75/EF/wKioL1ZFahejGs91AAAFNjk6Ruo484.png "style=" float: none; "title=" 1.PNG "alt=" Wkiol1zfahejgs91aaafnjk6ruo484.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/75/EF/wKioL1ZFaheS4AjaAAAmJpPvXUo231.png "style=" float: none; "title=" 2.PNG "alt=" Wkiol1zfahes4ajaaaamjppvxuo231.png "/>

2) make the newly added hard drive an LVM

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/75/F1/wKiom1ZFaczyMHA4AAAmhKIO9Qw104.png "style=" float: none; "title=" 3.PNG "alt=" Wkiom1zfaczymha4aaamhkio9qw104.png "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/75/F1/wKiom1ZFacyj8SXQAAA8UnAkNCo547.png "style=" float: none; "title=" 4.PNG "alt=" Wkiom1zfacyj8sxqaaa8unaknco547.png "/>

3) install scsi-target-utils on target server

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/75/EF/wKioL1ZFahiDfiVYAAAIdcC3jGo850.png "style=" float: none; "title=" 5.PNG "alt=" Wkiol1zfahidfivyaaaidcc3jgo850.png "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/75/F1/wKiom1ZFaczignZvAAAJgqupVsk716.png "style=" float: none; "title=" 6.PNG "alt=" Wkiom1zfaczignzvaaajgqupvsk716.png "/>

4) Edit the target configuration file

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/75/EF/wKioL1ZFahjTtXiBAAAHrKNfu-E445.png "style=" float: none; "title=" 7.PNG "alt=" Wkiol1zfahjttxibaaahrknfu-e445.png "/>

Add the following content

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/75/EF/wKioL1ZFahji6fZ_AAATXChIuoI870.png "style=" float: none; "title=" 8.PNG "alt=" Wkiol1zfahji6fz_aaatxchiuoi870.png "/>

5) Start the service and add boot

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/75/F1/wKiom1ZFac3Cf3WZAAATux3xGEQ237.png "style=" float: none; "title=" 10.PNG "alt=" Wkiom1zfac3cf3wzaaatux3xgeq237.png "/>

6) to view the current operation of the iSCSI target

There are newly generated target 1

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/75/EF/wKioL1ZFahnihJPvAAATi7GQ42g916.png "style=" float: none; "title=" 11.PNG "alt=" Wkiol1zfahnihjpvaaati7gq42g916.png "/>

Auto-created LUNs 1

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/75/EF/wKioL1ZFahnQ6nfhAAApD_vm-ic712.png "style=" float: none; "title=" 13.PNG "alt=" Wkiol1zfahnq6nfhaaapd_vm-ic712.png "/>

User authentication information created

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/75/F1/wKiom1ZFac2yF-nnAAAKR9g1-pI784.png "style=" float: none; "title=" 12.PNG "alt=" Wkiom1zfac2yf-nnaaakr9g1-pi784.png "/>

two. Deploying Initiator Client

1) Installing Scsi-initiator-utils

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/75/F1/wKiom1ZFac7ARmL7AAAH9dyqF3o785.png "style=" float: none; "title=" 14.PNG "alt=" Wkiom1zfac7arml7aaah9dyqf3o785.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/75/F1/wKiom1ZFac7j_GIsAAAJySJ7otI039.png "style=" float: none; "title=" 15.PNG "alt=" Wkiom1zfac7j_gisaaajysj7oti039.png "/>

2) Modify iSCSI configuration file

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/75/EF/wKioL1ZFahqzGWwtAAAGxP8Cd7Q111.png "style=" float: none; "title=" 16.PNG "alt=" Wkiol1zfahqzgwwtaaagxp8cd7q111.png "/>

Remove # To enable these options

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/75/EF/wKioL1ZFahrxi3MjAAAF9wL6mAU229.png "style=" float: none; "title=" 17.PNG "alt=" Wkiol1zfahrxi3mjaaaf9wl6mau229.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/75/F1/wKiom1ZFac-AgL4rAAAKvknqzoE199.png "style=" float: none; "title=" 18.PNG "alt=" Wkiom1zfac-agl4raaakvknqzoe199.png "/>

3) Start the service

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/75/EF/wKioL1ZFahqz4gFhAAAFz8J-5eU587.png "style=" float: none; "title=" 19.PNG "alt=" Wkiol1zfahqz4gfhaaafz8j-5eu587.png "/>

4) The client uses the Iscsiadm tool to discover and Login iSCSI Equipment

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/75/F1/wKiom1ZFac-xTt2OAAAOyHFU0jw633.png "style=" float: none; "title=" 20.PNG "alt=" Wkiom1zfac-xtt2oaaaoyhfu0jw633.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/75/F1/wKiom1ZFac_w2yDKAAAiYq2Ujts952.png "style=" float: none; "title=" 21.PNG "alt=" Wkiom1zfac_w2ydkaaaiyq2ujts952.png "/>

5) viewing the current disk partition, you can see that the/DEV/SDB has been added

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/75/F1/wKiom1ZFadDQkaYXAAAm20dIJVg948.png "style=" float: none; "title=" 23.PNG "alt=" Wkiom1zfaddqkayxaaam20dijvg948.png "/>

6) Partitioning and formatting of/DEV/SDB

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/75/EF/wKioL1ZFahvziVEKAAAp_krdBug906.png "style=" float: none; "title=" 24.PNG "alt=" Wkiol1zfahvzivekaaap_krdbug906.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/75/EF/wKioL1ZFahzyYFFbAAAn_yXAEjQ721.png "style=" float: none; "title=" 25.PNG "alt=" Wkiol1zfahzyyffbaaan_yxaejq721.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/75/F1/wKiom1ZFadCQ8dS1AAA6Tinu_IY959.png "style=" float: none; "title=" 26.PNG "alt=" Wkiom1zfadcq8ds1aaa6tinu_iy959.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/75/F1/wKiom1ZFadGTgSoRAAASowp02TY641.png "style=" float: none; "title=" 27.PNG "alt=" Wkiom1zfadgtgsoraaasowp02ty641.png "/>

7) mount the partition, we can use the

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/75/EF/wKioL1ZFahyRaSzmAAAHRD7c4lc372.png "style=" float: none; "title=" 31.PNG "alt=" Wkiol1zfahyraszmaaahrd7c4lc372.png "/>



































This article is from the "10319031" blog, please be sure to keep this source http://10329031.blog.51cto.com/10319031/1712441

Implementing iSCSI shared storage under Linux systems

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.