Step 2: Mounting your file system from an Amazon EC2 Linux instance - FSx for ONTAP
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Step 2: Mounting your file system from an Amazon EC2 Linux instance

You can mount your file system from an Amazon Elastic Compute Cloud (Amazon EC2) instance. This procedure uses an instance running Amazon Linux 2.

To mount your file system from Amazon EC2
  1. Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/.

  2. Create or select an Amazon EC2 instance running Amazon Linux 2 that is in the same virtual private cloud (VPC) as your file system. For more information about launching an instance, see Step 1: Launch an instance in the Amazon EC2 User Guide.

  3. Connect to your Amazon EC2 Linux instance. For more information, see Connect to your Linux instance in the Amazon EC2 User Guide.

  4. Open a terminal on your Amazon EC2 instance using secure shell (SSH), and log in with the appropriate credentials.

  5. Create a directory on your Amazon EC2 instance to use as the volume's mount point with the following command. In the following example, replace mount-point with your own information.

    $ sudo mkdir /mount-point
  6. Mount your Amazon FSx for NetApp ONTAP file system to the directory that you created. Use a mount command similar to the example that follows. In the following example, replace the following placeholder values with your own information.

    • nfs_version – The NFS version you are using; FSx for ONTAP supports versions 3, 4.0, 4.1, and 4.2.

    • nfs-dns-name – The NFS DNS name of the storage virtual machine (SVM) in which the volume you are mounting exists. You can find the NFS DNS name in the Amazon FSx console by choosing Storage virtual machines, then choosing the SVM on which the volume you are mounting exists. The NFS DNS name is found on the Endpoints panel, shown in the following image.

      The SVM details page in the Amazon FSx console showing the SVM Endpoints panel.
    • volume-junction-path – The junction path of the volume that you're mounting. You can find a volume's junction path in the Amazon FSx console on the Summary panel of the Volume details page, shown in the following image.

      The SVM details page in the Amazon FSx console showing the SVM Endpoints panel.
    • mount-point – The name of the directory that you created on your EC2 instance for the volume's mount point.

    sudo mount -t nfs -o nfsvers=nfs_version nfs-dns-name:/volume-junction-path /mount-point

    The following command uses example values.

    sudo mount -t nfs -o nfsvers=4.1 svm-abcdef1234567890c.fs-012345abcdef6789b.fsx.us-east-2.amazonaws.com:/vol1 /fsxN

If you have issues with your Amazon EC2 instance (such as connections timing out), see Troubleshoot EC2 instances in the Amazon EC2 User Guide.