This topic describes how to access local gateways from a client that is running Linux.

Prerequisites

You have created a Network File System (NFS) share. For more information, see Install an NFS client.

Background information

To access a gateway from a client that is running Linux, you must mount the NFS share to a local file directory. After the share is mounted, directory mappings are established between the share and the local directory. You can access the remote share in the same way as you access a local directory.

Procedure

  1. Log on to a local Linux client.
  2. Mount the NFS share to the local directory where the client belongs.
    1. Run the following command to mount the NFS share:
      mount.nfs 192.168.0.0:/shares local-directory
      • 192.168.0.0:/shares: the mount point of the file gateway, including the gateway IP address and the share name. Replace them with the actual IP address and share name. On the Share page of the gateway in the Cloud Storage Gateway console, you can view the mount points.
      • local-directory: the local file directory. Specify any file directory that supports read and write operations. You cannot specify a directory that does not exist.
      Note If your file gateway version is earlier than 1.0.35, and you have mounted shares by using the NFSv3 protocol, then you must run the showmount -e <The IP address of the file gateway> command to query the mount path. The procedure is as follows.
      1. Run the following command to query the mount path, for example, 192.168.0.0:/shares.
        showmount -e <The IP address of the file gateway>
      2. Run the following command to mount the share to the local directory.
        mount -t nfs -o vers=3,proto=tcp,nolock,noacl,sync 192.168.0.0:/shares local-directory
    2. Run the df -h command to verify the result.

      If the following or similar information appears, it indicates that the share is mounted to the local directory.

      Note The capacity of the mounted share equals the Object Storage Service (OSS) bucket capacity. The displayed capacity 256 TB is the maximum capacity of the file system. Currently, the capacities of OSS buckets are not limited.
      Verify the result
  3. Access the NFS share.

    After the NFS share is mounted to the local directory, you can access the remote share in the same way as you access a local directory. If you have the write permission, you can write data to the NFS share. If you have the read-only permission, then you can only read data from the NFS share.

    Note Shares are synchronized with the associated OSS buckets. Operations performed on shares are synchronized to the associated OSS buckets.