The main functionality of ISCSI is the encapsulation and reliable transmission of large amounts of data between host systems (initiator initiator) and storage devices (target targets) on TCP/IP networks. You need to install target on the server of Linux, and the client will install Inititor.
The configuration process is as follows:
Test IP as 192.168.157.144 on the host
[email protected] ~]# Yum install iscsi-initiator-utils.i386
[email protected] ~]# Yum install scsi-target-utils.i386
Start target when installation is complete
Service TGTD Start
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5B/F1/wKioL1UXvC7xvH_VAACBRZjOQLE574.jpg "title=" 3.PNG " alt= "Wkiol1uxvc7xvh_vaacbrzjoqle574.jpg"/>
Target's configuration file is only/etc/tgt/targets.conf
in the SRV under iSCSI directory to build an IMG file to use as iSCSI Network file sharing
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5B/F7/wKiom1UXu9DQPmkHAAEpILZ5lAI837.jpg "title=" 8.PNG " alt= "Wkiom1uxu9dqpmkhaaepilz5lai837.jpg"/>
Editing a configuration file targets.conf
Add at the end of the file
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/F1/wKioL1UXvVfSiLDcAACIIBbGHuc904.jpg "title=" 13.PNG "alt=" Wkiol1uxvvfsildcaaciibbghuc904.jpg "/>
After everything is done, restart service TGTD restart
Use the command tgt-admin--show to view
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5B/F7/wKiom1UXvJKCfzrpAAIL5B0zvFo942.jpg "title=" 12.PNG "alt=" Wkiom1uxvjkcfzrpaail5b0zvfo942.jpg "/>
Service-Side completion
Perform client operations
Installing the iSCSI Boot Service
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/F1/wKioL1UXvkLQBNfaAAIUCBHmo3k441.jpg "title=" 5.PNG " alt= "Wkiol1uxvklqbnfaaaiucbhmo3k441.jpg"/>
Use the command iscsiadm-m discovery-t sendtargets-p 192.168.157.144 to view network shares
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5B/F7/wKiom1UXvb6wll7WAAHvWyV-APY469.jpg "title=" 11.PNG "alt=" Wkiom1uxvb6wll7waahvwyv-apy469.jpg "/>
After finding the share node, log in to iSCSI
Iscsiadm-m node-t Iqn.2008-09.dev:server.iscsidisk--login
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/F1/wKioL1UXv02i75piAAD0Ymi_SJ0214.jpg "title=" 10.PNG "alt=" Wkiol1uxv02i75piaad0ymi_sj0214.jpg "/>
View the hard drive to see the extra SDB
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/F7/wKiom1UXvk3gPU1eAAGYa0N3UzY152.jpg "title=" 9.PNG " alt= "Wkiom1uxvk3gpu1eaagya0n3uzy152.jpg"/>
Create a SDB as a logical volume
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/F7/wKiom1UXvv3QIZ1QAAHntjSOULg839.jpg "title=" 14.PNG "alt=" Wkiom1uxvv3qiz1qaahntjsoulg839.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5B/F1/wKioL1UXwEvQzFDFAAFYTDK-DFA552.jpg "title=" 15.PNG "alt=" Wkiol1uxwevqzfdfaafytdk-dfa552.jpg "/>
Formatted LV volume MKFS.EXT3/DEV/ISCSI/ISCSILV after completion
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5B/F1/wKioL1UXwMqxFzqOAACO_ZYJ0xU085.jpg "title=" 16.PNG "alt=" Wkiol1uxwmqxfzqoaaco_zyj0xu085.jpg "/>
Mount the volume to the local/MNT/ISCSI directory and use it when you are finished
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5B/F1/wKioL1UXwSCBKnBeAACwq_oIZSM911.jpg "title=" 17.PNG "alt=" Wkiol1uxwscbknbeaacwq_oizsm911.jpg "/>
Use the command df-th to view mount conditions
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5B/F1/wKioL1UXwVqztoMgAAECG1Nwa3Q852.jpg "title=" 18.PNG "alt=" Wkiol1uxwvqztomgaaecg1nwa3q852.jpg "/>
Client uses server-side sharing success
Use commands on the server to view the sharing situation
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/F7/wKiom1UXwHGA_uK2AAI5tqU7hXE038.jpg "title=" 19.PNG "alt=" Wkiom1uxwhga_uk2aai5tqu7hxe038.jpg "/>,
On the server side, you can view connections from 192.168.157.144 using
The configuration for iSCSI is complete.
Use RPM package installation before configuration
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/F1/wKioL1UXxC3x4RtrAACgFJPvDfE128.jpg "title=" 7.PNG " alt= "Wkiol1uxxc3x4rtraacgfjpvdfe128.jpg"/>
An error occurred
Nokey
Solutions
Using commands, Import
[Email protected] home]# rpm--import/etc/pki/rpm-gpg/rpm*
or directly import the file download source rpm-gpg-key-*
[email protected] home]# CP rpm-gpg-key-*/etc/pki/rpm-gpg/
Error two
[Email protected] home]# RPM-IVH iscsi-initiator-utils-6.2.0.871-0.16.el5.i386.rpm warning:waiting for transaction Lock on/var/lib/rpm/__db.000
Solve
[Email protected] home]# rm-f/var/lib/rpm/__db.*
Successfully resolved.
This article is from the "Filter New" blog, please be sure to keep this source http://wahehe.blog.51cto.com/8935316/1626205
iSCSI Network storage configuration under Linux