RHEL7.0 iSCSI Configuration

Source: Internet
Author: User

iSCSI Remote Block Storage
Brief introduction
Topics covered in this blog:
iSCSI Concepts
Providing iSCSI targets
accessing iSCSI Storage

    1. iSCSI Concepts

      ISCSI (Internet SCSI) supports sending SCSI commands to SCSI storage devices (targets) on remote servers from the client (initiator) via IP. The iSCSI qualified name is used to determine the initiator and destination, and in the Iqn.yyyy-mm.{reverse Domain}:label format. By default, network traffic is clear text to the port 3260/tcp on the iSCSI target.
      iSCSI Initiator: Clients that need access to raw SAN storage.
      iSCSI Target: A remote hard disk that is provided from an iSCSI server, or a "target portal"
      iSCSI Target Portal: The server that provides the target to the initiator through the network.
      IQN: "iSCSI qualified name". Each initiator and target requires a unique name to identify, and the best practice is to use a name that may be unique on the Internet.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/87/4C/wKiom1fbgw_RiEqFAAE7pfBE9K4533.png "title=" Screenshot from 2016-09-16 21-28-17.png "alt=" Wkiom1fbgw_rieqfaae7pfbe9k4533.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/87/4A/wKioL1fbgzLQPKSNAAEGJds-ZHM663.png "title=" Screenshot from 2016-09-16 21-29-05.png "alt=" Wkiol1fbgzlqpksnaaegjds-zhm663.png "/>

2.iSCSI Target configuration

To install the iSCSI target package:
# yum Install-y targetcli
Start the service:
# Systemctl enable target; Systemctl start target
Enter iSCSI Target Interactive configuration mode:
# TARGETCLI
www.westos.org
8Demo
/> ls
O/... ... .... ... .... ... .... ... .... ... .... ..... ..... .... ..... ..... ..... ........, ..., ... and .....-...... [...]
O-backstores ... ..... ..... .... ..... ..... .... ............................ [...]
| O-block ...... ..... ........................... [Storage objects:0]
| O-fileio ..... ..... ........................... [Storage objects:0]
| O-pscsi ...... ..... ........................... [Storage objects:0]
| O-ramdisk ...... ..... ......................... [Storage objects:0]
O-iscsi ... ..... ..... .... ..... ..... ............................. [targets:0]
O-loopback ..... ..... ..... ..... ..... .......................... [targets:0]
/>/backstores/block Create Server0.disk1/dev/iscsi_vg/disk1_lv
Created Block Storage Object Server0.disk1 using/dev/iscsi_vg/disk1_lv.
/>/ISCSI Create Iqn.2016-09.com.example:server0
Created Target Iqn.2016-09com.example:server0.
Created TPG 1.
www.westos.org
9/>/iscsi/iqn.2016-09.com.example:server0/tpg1/acls Create Iqn.2016-09.com.example:desktop0
Created Node ACL for Iqn.2016-09.com.example:desktop0
/>/iscsi/iqn.2016-09.com.example:server0/tpg1/luns Create/backstores/block/server0.disk1
Created LUN 0.
Created LUN 0->0 Mapping in node ACL iqn.2016-09.com.example:desktop0
/>/iscsi/iqn.2016-09.com.example:server0/tpg1/portals Create 172.25.0.11
Using Default IP Port 3260
Created Network Portal 172.25.0.11:3260.
/> Exit

3. Accessing iSCSI Storage

Installing the iSCSI Initiator package:
# yum install-y iscsi-initiator-utils
Set initiator iqn in/ETC/ISCSI/INITIATORNAME.ISCSI:
Initiatorname=iqn.2016-09.com.example:desktop0
Find iSCSI targets provided by iSCSI server (target portal)
# iscsiadm-m Discovery-t st-p 172.25.0.11
One or more iSCSI targets on the logon server
# iscsiadm-m node-t iqn.2016-09.com.example:server0-p
172.25.0.11-l
Www.westos.org
At this point, you can use an iSCSI disk as if it were a locally attached hard drive. The
can mount an existing file system. If the disk is not formatted, you can partition it through Fdisk, for example, by using the
file system to format the partition or as an LVM physical volume.
mount the file system permanently in/etc/fstab
1. Use Blkid to determine the file system UUID and use the UUID mount instead of the/dev/sd* device name. (The device names that are displayed at each
boot are different, depending on the order in which the iSCSI devices respond over the network.)
If you mount by device name, this causes the wrong device to be used.
2. Use _netdev as the Mount option in/etc/fstab. (This ensures that the client does not attempt to mount the file system
until networking is enabled.) Otherwise, the system will fail at boot time.
3. Ensure that the iSCSI service starts at boot time.

Interrupt the use of iSCSI targets
Make sure you are not using any of the devices provided by the target.
Ensure that all permanent mounts using the target are removed from locations such as/etc/fstab.
Log out of the iSCSI target to temporarily disconnect the connection.
# iscsiadm-m Node-t iqn.2016-09.com.example:rdisks.demo-p 172.25.0.11-u
Delete the local record of the iSCSI target to permanently disconnect.
# iscsiadm-m node-t iqn.2016-09.com.example:rdisks.demo-p 172.25.0.11-o Delete

This article is from the "People in Need" blog, please be sure to keep this source http://zzkkk.blog.51cto.com/11721816/1853100

RHEL7.0 iSCSI Configuration

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.