Information Technology Reference
In-Depth Information
a root from the terminal of the storage server.
# man tgtadm
7. Define a new iSCSI target name, as follows:
# tgtadm --lld iscsi --op new --mode target --tid=1
--targetname rhev-data-disk-1:storage.example.com
8. Attach the 49 GB lvm block device that we created in the previous steps as your
first logical unit to the target:
# tgtadm --lld iscsi --op new --mode logicalunit
--tid 1 --lun 1 -b /dev/rhevsd/datadisk1
9. Define an access control for the newly created logical unit, and the following
command will allow any iSCSI initiators to access it:
# tgtadm --lld iscsi --op bind --mode target --tid 1
-I ALL
Tip
It's highly recommended to restrict target access to the required client IP address
to prevent unauthorized usage of the target. In your case, you need to restrict ac-
cess to all the hypervisor host storage logical network subnets or IPs.
10. To view the current configuration, run the following command:
# tgtadm --lld iscsi --op show --mode target
11. Finally, make sure that the TCP port 3260 is accessible from all the hypervisor
host storage logical network segment IPs.
12. From RHEL 5.3 and higher, you can use the tgt-admin command line to dump
the target configuration and redirect to the configuration file to make the target
configuration persist across the reboot. Take a look at the following commands:
[root@storage ~]# tgt-admin --dump
default-driver iscsi
<target rhev-data-disk-1:storage.example.com>
backing-store /dev/rhevsd/datadisk1
</target>
Search WWH ::




Custom Search