iSCSI is Internet SCSI (Small Computer System Interface), an Internet Protocol (IP)-based storage networking standard for linking data storage facilities, developed by the Internet Engineering Task Force (IETF). By carrying SCSI commands over IP networks, iSCSI is used to facilitate data transfers over intranets and to manage storage over long distances.
First, install the iscsi-initiator-utils package using:
# yum install iscsi-initiator-utils
Next, start the iscsid service and enable it to start when the system boots:
# service iscsid start
# chkconfig iscsid on
Then obtain a listing of available targets from a given host (please note that ipaddress listed below must be replaced with the resolvable hostname or ip address of the system providing the port if different than default):
# iscsiadm -m discovery -t sendtargets -p ipaddress
Here the "iqn.2013-05.com.server:tgtd" is the target_iqn_name.
You can view the information of your target by:
# iscsiadm -m node -T -p ipaddress
Finally, use the following command to login to the available target (again, replace target_iqn_name with one from the output of the previous command and replace ipaddress below with that of the target system):
# iscsiadm -m node -T target_iqn_name -p ipaddress -l
Logging in to [iface: default, target:iqn.2013-05.com.server:tgtd, portal: xxx.xxx.xxx.xxx,4460]
Login to [iface: default, target: iqn.2013-05.com.server:tgtd, portal: xxx.xxx.xxx.xxx,4460]: successful
Note, you can log into all the LUNs exported on the target by running:
# iscsiadm -m discovery -t st -l
This will enable the target(or targets if you logged into all) to be accessed upon reboots and it stores it in a node database found in /var/lib/iscsi that is more thoroughly described in the /usr/share/doc/iscsi-initiator-utils-VERSION/README file.
If you want to disable the target, you need log out by:
# iscsiadm -m node -T target_iqn_name -p ipaddress -u
Note, you can log out of all targets by running:
# iscsiadm -m node -U all
For a more verbose listing of possible options for the iscsiadm command in Linux 5 refer to the manual page using:
# man iscsiadm
For a good overview of iSCSI in Linux 5 refer to the documentation provided in /usr/share/doc/iscsi-initiator-utils-VERSION/README.
Try it now.
Ideal place for discussions related to Linux/Windows server security, Apache, MySQL, MS SQL and PHP, including tutorials and questions.
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest