Menu
AWS Storage Gateway
User Guide (API Version 2013-06-30)

Using Your File Share

Following, you can find instructions about how to mount your file share on your client, use your share, and test your file gateway. Your file share accepts connections from any NFS client. For more information, see Supported NFS Clients For File Gateway.

Mounting Your File Share on Your Client

Now, you mount the file share on a drive on your client and map it to your Amazon S3 bucket.

To mount a file share and map it to a Amazon S3 bucket

  1. If you are using a Windows client, turn on Services for NFS.

  2. Mount your file share.

    • For Windows clients, type the following command at the command prompt:

      mount –o nolock [Your gateway VM IP address]:/[S3 bucket name][Drive letter on your windows client]:

    • For Linux clients, type the following command at the command prompt:

      sudo mount -t nfs -o nolock [Your gateway VM IP address]:/[S3 bucket name][mount path on your client]:

    • For MacOS clients, type the following command at the command prompt:

      sudo mount_nfs -o vers=3,nolock -v [Your gateway VM IP address]:/[S3 bucket name][mount path on your client]:

    For example, on a Windows client, if your VM's IP address is 123.456.1.2, and your Amazon S3 bucket name is test-bucket and you want to map to drive T, your command looks like the following:

    mount –o nolock 123.456.1.2:/test-bucket T:

    Note

    If a folder and an object exist in an Amazon S3 bucket and they have the same name and the object name doesn't contain a trailing slash, only the folder is visible in file gateway. For example, if bucket contains an object named test, or test/ and a folder named test/test1, only test/ and test/test1 will be visible in file gateway.

    You may need to re-mount your file share after a reboot of your client.

Testing Your File Gateway

You can copy files and folders to your mapped drive and the files automatically upload to your Amazon S3 bucket.

To upload files from your windows client to Amazon S3

  1. On your Windows client, navigate to your drive letter you mounted your file share on. The name of your drive is preceded by the name of your S3 bucket.

  2. Copy some files or a folder to the drive.

  3. On the Amazon S3 management console, navigate to your mapped bucket. You should see your files and folders you copied in the Amazon S3 bucket you specified.

    You can see the file share you created in the File shares tab in the AWS Storage Gateway Management Console.

Your NFS client can write, read, delete, rename, and truncate files.

Note

File gateway does not support creating hard or symbolic links on a file share.

Reads are served from a read-through cache, that is, if data is not available, it is fetched from S3 and added to the cache. Writes are sent to S3 through optimized multi-part uploads through a write-back cache. Read and writes are optimized so that only the parts that are requested or changed are transferred over the network. Deletes remove objects from S3. Directories are managed as folder objects in S3, using the same syntax as the Amazon S3 console. You can rename empty directories. Recursive file system operation performance (for example ls –l) will depend on the number of objects in your bucket.