AWS Storage Gateway User Guide
Connecting Your Volumes or VTL Devices to a Linux Client
a. Verify that the iSCSI daemon is running using one of the following commands.
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
b. If the status command doesn't return a status of
running
, then start the daemon using one of
the following commands.
For RHEL 5 or 6, use the following command.
sudo /etc/init.d/iscsi start
For RHEL 7, use the following command. For RHEL 7, you usually don't need to explicitly start
the iscsid service.
sudo service iscsid start
3. To 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
Substitute your gateway's IP address for the
[GATEWAY_IP]
variable in the preceding command.
You can find the gateway IP in the
iSCSI Target Info
properties of a volume on the AWS Storage
Gateway console.
The output of the discovery command will 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
Your iSCSI qualified name (IQN) will be different than what is shown preceding, because IQN values
are unique to an organization. The name of the target is the name that you specified when you
created the volume. You can also find this target name in the
iSCSI Target Info
properties pane
when you select a volume on the AWS Storage Gateway console.
4. To connect to a target, use the following command.
Note that you need to specify the correct
[GATEWAY_IP]
and IQN in the connect command.
Warning
For gateways that are deployed on an Amazon EC2 instance, accessing the gateway over
a public Internet connection is not supported. The elastic IP address of the Amazon EC2
instance cannot be used as the target address.
sudo /sbin/iscsiadm --mode node --targetname iqn.1997-05.com.amazon:
[ISCSI_TARGET_NAME]
--portal
[GATEWAY_IP]
:3260,1 --login
5. To verify that the volume is attached to the client machine (the initiator), use the following
command.
API Version 2013-06-30
373