Build Ip-san storage servers with existing servers

Source: Internet
Author: User

First, the preparatory work

CentOS6.4 server 2 units (1 for Ip-san storage server, 1 for streaming media server)

Iscsitatget Software

ISCSI Initiator

Second, install iSCSI target software (Ip-san server)

Iscsitarget: Http://iscsitarget.sourceforge.net[[email protected] iSCSI] #tar-xzvfiscsitarget-1.4.20.1.tar.gz[[ Email protected] iSCSI] #cd Iscsitarget-1.4.20.1[[email protected] iscsitarget-1.4.20.1] #make [[email protected] iscsitarget-1.4.20.1] #makeinstall [[email protected] iscsi]# service Iscsi-target Usage:/etc/init.d/iscsi-target{st Art|stop|restart|condrestart|status}


Configuring the Ietd.conf File

ISCSI Enterprise Target The main profile is/etc/iet/ietd.conf, open ietd.conf to find a line similar to the following:

#Target iqn.2016-03.com.example:storage.disk2.sys1.xyz Iqn.yyyy-mm.<reverseddomain Name>[:identifier]


which

IQN : "ISCSI qualified Name", referred to as IQN.

yyyy-mm : Represents the year-month. This is 2016-03.

Reversed domain name : Indicates the inverted domain name, here is com.example.

identifier : Indicates the identification code, this is storage.disk2.sys1.xyz.

Configuring the Ietd.conf File

Set the LUN (Logical Unit number) and find a line similar to the following:

#Lun 0 path=/dev/sdb,type=fileio,scsiid=xyz,scsisn=xyz


Remove the previous "#" number, "Lun 0 path=/dev/sdb" means block device number 0, mapped disk is/dev/sdb, "Type" value FileIO is the default, can be used for disk, file and LVM, which is set to " FileIO ", which is used primarily for storage sharing on a disk.

At this point , the simple iSCSI target configuration is complete and the Iscsi-target service is finally started:

[[Email protected] iscsi]# service Iscsi-targetstart


Third, install iSCSI initiator (Streaming media server)

the major Linux distributions default to iSCSI initiator, and if the system is not installed, simply search through the disc.

Here, for example, the centos6.4 version is installed using the ISCSI-INITIATOR-UTILS-6.2.0.871-0.16.EL5.I386.RPM package:

[[Email protected] Initiator iSCSI] #rpm –IVH iscsi-initiator-utils-6.2.0.871-0.16.el5.i386.rpm

When the installation is complete, the/ETC/ISCSI main program configuration directory is generated.

To start the initiator service, proceed as follows:

[[Email protected] Initiator iscsi]# service iSCSI start


Iv. performing iSCSI target Discovery on Linux

You can use the following instructions to query the ISCSI Target host for which LUNs are divided:

ISCSIADM-M Discovery--type sendtargets--portal IP

Or

Iscsiadm-m discovery-t sendtargets-p IP


It should be noted that when target discovery is successfully executed, the ISCSI initiator writes the query record to the/var/lib/iscsi/send_targets corresponding directory.  Therefore, the target discovery can only be performed once.

Discovery (/var/lib/iscsi/send_targets) : In the/var/lib/iscsi/send_targets directory, generate a target server information file named "Target service IP, port number" (e.g. "200.200.10.200,3260"). This file is used to record target server information.

Node (/var/lib/iscsi/nodes) : In the/var/lib/iscsi/nodes directory, generate one or more folders named after the target name on the target storage server, with a file under each folder that is used to record specific target information on the target server.

V. Establishing an association with the iSCSI Target via the ISCSIADM directive

Iscsiadm is a command-line tool for managing (updating, deleting, inserting, querying) iSCSI metabase files that users can use to perform a series of operations on iSCSI nodes, sessions, connections, and Discovery Records.

(1) Login Iscsitarget:

Iscsiadm-m node-t <target-name>-p<ip-address>:<port>--login

Or

Iscsiadm-m node-t [Target-name]-P [ip-address]-L


here the "-T" followed by the target name, "Ip-address" is the target host IP address, "Port" is the target host port number, the default is 3260.

(2) Disconnect the initiator from the iSCSI Target Host:

Iscsiadm-m node-t [Target-name]-P [ip-address]–u


3 , associating with iSCSI Target via the ISCSIADM Directive

(3) View sicsisession and device information:

Iscsiadm-m session-i iscsiadm–m Session–r


If a new volume is added to a target, use the Iscsiadm–m session–r command on the server to refresh the currently connected session to see the new volume

(4) View those target records in the database:

ISCSIADM-M node


(5) View target storage-related configuration information

Iscsiadm-m node-t iqn.2010-11.net.ixdba:sdc-p192.168.12.246iscsiadm-m discovery–p 192.168.12.246



This article is from the "Dream Life" blog, please be sure to keep this source http://hzde0128.blog.51cto.com/918211/1836358

Build Ip-san storage servers with existing servers

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.