iSCSI Linux Clients

Source: Internet
Author: User

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

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.