Use of ISCSI Linux clients
Under Linux, the appropriate iSCSI client software Iscsi-initiator needs to be installed, as follows:
Step 0: Install the iSCSI client software that can be installed via Yum or via RPM.
Step 1: Configure iSCSI
Open/etc/iscsi/iscsid.conf by VI:
# vi/etc/iscsi/iscsid.conf
?
Set the user name and password (required when the target side sets CHAP authentication, if the target side does not have CHAP authentication set, you can skip):
Node.session.auth.username = My_iscsi_usr_name
Node.session.auth.password = MyPassword
Discovery.sendtargets.auth.username = My_iscsi_usr_name
Discovery.sendtargets.auth.password = MyPassword
Step 2: Search for targets
You can now search and log into iSCSI targets with the Iscsiadm command, and it can read and access the database provided by the OPEN-ISCSI. If your iSCSI storage server has an IP address of 192.168.101.102, enter:
# iscsiadm-m Discovery-t sendtargets-p 192.168.101.102
The name of the server address and IQN can be seen from the output
Restart the iSCSI service, you can see in the/dev/directory, a more block device, to obtain the name of this device, enter: Fdisk-l
Step 3: Format and mount the iSCSI volume
You can use Fdisk to partition/dev/sdb, and then use MKFS.EXT3 to create a file system on/DEV/SDB, with the following command:
Partition
# FDISK/DEV/SDB
......
Formatting
# MKFS.EXT3/DEV/SDB1
It is now possible to use the hard drive provided by the server storage as you would with a local hard drive.
Step 4: Automatically mount the iSCSI device the next time you start the system
First, make sure that the iSCSI service is able to run at system startup:
# chkconfig iSCSI on
Open the/etc/fstab file again and add the following settings:
/DEV/SDB1/MNT/ISCSI ext3 _netdev 0 0
Exit after saving
OK, end normally.
iSCSI Linux Clients