United States (change)
Shortcuts: Downloads Fedora Red Hat Network
Release Found: Red Hat Enterprise Linux 5.3
Starting from Red Hat Enterprise Linux 5.3 Advance Platform, /etc/tgt/targets.conf can be used to configure an iscsi target. It is provided by scsi-target-utils package, which is located in the Cluster-Storage child channel. (Before Red Hat Enterprise Linux 5.3, you had to use tgtadm. See How to setup an iSCSI target using tgtadm in Red Hat Enterprise Linux 5? for more information.)
The /etc/tgt/targets.conf file allows a system to serve block-level SCSI storage to other systems that have an iSCSI initiator. This capability is being initially deployed as a Linux iSCSI target, serving storage over a network to any iSCSI initiator.
For example, here we create a 512M file as the block device:
# dd if=/dev/zero of=/disk1 bs=1M count=512 Then we create the /etc/tgt/targets.conf like this:
<target iqn.2001-04.com.example:storage.disk1.amiens.sys1.xyz>
backing-store /disk1
</target>Then you can start the tgtd service:
# service tgtd startIf you want tgtd to start when the system boots up:
# chkconfig tgtd on Ensure TCP port 3260 can be accessed from the remote host.
After the software iSCSI target is setup, you can setup the iSCSI initiator on the remote host and login to this target. Refer to the Knowledgebase Article How do I configure Red Hat Enterprise Linux 3 or 4 to access iSCSI storage? and How do I configure the iscsi-initiator in Red Hat Enterprise Linux 5? for more information.
For the format of targets.conf or other available options, you can see man tgt-admin for more information.