AWS Storage Gateway User Guide
Using Your Volume
You can use the following command to install the package.
sudo yum install iscsi-initiator-utils
2. Make sure that the iSCSI daemon is running.
For RHEL 5 or 6, use the following command.
sudo /etc/init.d/iscsi status
For RHEL 7, use the following command.
sudo service iscsid status
3. Discover the volume or VTL device targets defined for a gateway. Use the following discovery
command.
sudo /sbin/iscsiadm --mode discovery --type sendtargets --portal
[GATEWAY_IP]
:3260
The output of the discovery command should look like the following example output.
For volume gateways:
[GATEWAY_IP]
:3260, 1 iqn.1997-05.com.amazon:myvolume
For tape gateways:
iqn.1997-05.com.amazon:
[GATEWAY_IP]
-tapedrive-01
4. Connect to a target.
Make sure to specify the correct
[GATEWAY_IP]
and IQN in the connect command.
Use the following command.
sudo /sbin/iscsiadm --mode node --targetname iqn.1997-05.com.amazon:
[ISCSI_TARGET_NAME]
--portal
[GATEWAY_IP]
:3260,1 --login
5. Verify that the volume is attached to the client machine (the initiator). To do so, use the following
command.
ls -l /dev/disk/by-path
The output of the command should look like the following example output.
lrwxrwxrwx. 1 root root 9 Apr 16 19:31 ip-
[GATEWAY_IP]
:3260-iscsi-
iqn.1997-05.com.amazon:myvolume-lun-0 -> ../../sda
We highly recommend that after you set up your initiator you customize your iSCSI settings as
discussed in
Customizing Your Linux iSCSI Settings (p. 376)
.
Initializing and Formatting Your Volume
After you use the iSCSI initiator in your client to connect to your volumes, you initialize and format your
volume.
Topics
•
Initializing and Formatting Your Volume on Microsoft Windows (p. 67)
•
Initializing and Formatting Your Volume on Red Hat Enterprise Linux (p. 67)
API Version 2013-06-30
66