Iscsi linux client, iscsilinux

Source: Internet
Author: User

Iscsi linux client, iscsilinux

Use of iSCSI Linux clients
In Linux, you need to install the ISCSI client software iscsi-initiator. The installation process is as follows:
Step 0: Install the iSCSI client software through yum or rpm.
Step 1: Configure iSCSI
Open/etc/iscsi/iscsid. conf through vi:
# Vi/etc/iscsi/iscsid. conf
?
Set the user name and password (required when CHAP authentication is set on the target side. skip this step if CHAP authentication is not set on the target side ):
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
Now you can use the iscsiadm command to search for and log on to the iSCSI targets. It can also read and access the open-iscsi database. If the IP address of your ISCSI storage server is 192.168.101.102, enter:
# Iscsiadm-m discovery-t sendtargets-p 192.168.101.102

The output shows the server address and iqn name.
Restart the iscsi service and you will see an additional block device in the/dev/directory. To obtain the name of the 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. The command is as follows:
Partition
# Fdisk/dev/sdb
......
Format
# Mkfs. ext3/dev/sdb1
Now, you can use the hard disk provided by server storage like a local hard disk.
Step 4: automatically mount the iSCSI Device when the system is started next time
First, make sure that the iscsi service runs when the system starts:
# Chkconfig iscsi on
Open the/etc/fstab file and add the following settings:
/Dev/sdb1/mnt/iscsi ext3 _ netdev 0 0
Save and exit

OK. It ends normally.

Related Article

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.