Previous page

Next page

Locate page in Contents

Print this page

Setting Up iSCSI Environment in Virtuozzo-Based Systems

iSCSI (Internet Small Computer System Interface) is a TCP/IP-based protocol meant for transmitting data over local area networks (LANs), wide area networks (WANs), or the Internet and providing location-independent data storage and retrieval. The iSCSI protocol is mainly used to interconnect hosts (e.g. database servers) with shared storage systems on SANs (Storage Area Networks). In this connection it aims at achieving the following goals:

The implementation of an iSCSI storage system in a Virtuozzo Containers environment does not differ from that in standard environments and is based on the three main components: a TCP/IP network, an initiator, and a target. The interaction among the components in a Virtuozzo-based system may roughly be described as follows:

To configure a Hardware Node to communicate with a target (e.g. some SCSI storage device) via the iSCSI protocol, you should perform the following operations on the Node:

  1. Install the iscsi-initiator-utils RPM package providing the server daemon for the iSCSI protocol and the necessary utilities for its managing:

    # rpm -ihv iscsi-initiator-utils-

  2. Discover your iSCSI target using the iscsiadm utility:

    # iscsiadm --mode discovery --type sendtargets --portal <target_IP_address>

    where <target_IP_address> denotes the IP address used to access the target.

  3. Log in to the target using the iscsiadm utility:

    # iscsiadm --mode node --login automatic

    This command saves the information about the target to the /var/lib/iscsi/nodes directory on the Hardware Node, which allows your Node to automatically detect the iSCSI target on its boot.

After completing the operations above, a new iSCSI device should appear under the /dev directory on your Node. You can find out the device name using the fdisk -l or tail -f /var/log/messages command.

Now you can mount the iSCSI device to your Hardware Node using the mount utility. Assuming that your iSCSI device has the name of /dev/sdb1 and you wish to mount it to the /vz directory on your Node, this can be done as follows:

# mount /dev/sdb1 /vz

Note: If you have not yet partitioned your target, you should partition it and create a filesystem on it (using the fdisk and mkfs utilities) prior to mounting the iSCSI device to your Node.

You can also automate the procedure of mounting your iSCSI partition on the Hardware Node boot by editing the /etc/fstab file. For example, if you wish to have the /dev/sdb1 partition automatically mounted on the Node boot and this partition is formatted to ext3, you can add the following string to the /etc/fstab file:

/dev/sdb1 /vz ext3 defaults 0 0

Important! If your iSCSI partition is formatted to ext3, make sure that you have this partition mounted to only one Hardware Node at a time; otherwise, the SCSI storage may become corrupted.

Please send us your feedback on this help page