AWS Storage Gateway User Guide
Using Your File Share
mount –o nolock -o mtype=hard [Your gateway VM IP address]:/[S3 bucket
name] [Drive letter on your windows client]
For example, suppose that on a Windows client your VM's IP address is 123.123.1.2 and your
Amazon S3 bucket name is test-bucket. Suppose also that you want to map to drive T. In this
case, your command looks like the following.
mount -o nolock -o mtype=hard 123.123.1.2:/test-bucket T:
Note
When mounting file shares, be aware of the following:
• You might have a case where a folder and an object exist in an Amazon S3 bucket and
have the same name. In this case, if the object name doesn't contain a trailing slash, only
the folder is visible in a file gateway. For example, if a bucket contains an object named
test or test/ and a folder named test/test1, only test/ and test/test1 are
visible in a file gateway.
• You might need to remount your file share after a reboot of your client.
• By default Windows uses a soft mount for mounting your NFS share. Soft mounts time
out more easily when there are connection issues. We recommend using a hard mount
because a hard mount is safer and better preserves your data. The soft mount command
omits the -o mtype=hard switch. The Windows hard mount command uses the -o
mtype=hard switch.
• If you are using Windows clients, check your mount options after mounting by running
the mount command with no options. The response should that confirm the file share
was mounted using the latest options you provided. It also should confirm that you are
not using cached old entries, which take at least 60 seconds to clear.
Next Step
Testing Your File Gateway (p. 55)
Mounting Your SMB File Share on Your Client
Now you mount your SMB file share and map to a drive accessible to your client. The console's file
gateway section shows the supported mount commands that you can use for SMB clients. Following, you
can find some additional options to try.
You can use several different methods for mounting SMB file shares, including the following:
• The net use command – Doesn't persist across system reboots, unless you use the /persistent:
(yes:no) switch. The specific command that you use depends on whether you plan to use your file
share for Microsoft Active Directory (AD) access or guest access.
• The CmdKey command line utility – Creates a persistent connection to a mounted SMB file share that
remains after a reboot.
• A network drive mapped in File Explorer – Configures the mounted file share to reconnect at sign-in
and to require that you enter your network credentials.
• PowerShell script – Can be persistent, and can be either visible or invisible to the operating system
while mounted.
Note
If you are a Microsoft AD user, check with your administrator to ensure that you have access to
the SMB file share before mounting the file share to your local system.
API Version 2013-06-30
52