Skip to main content

Test NFS access from client systems

Contributors netapp-aherbin

After you verify NFS access to the new storage object, you should test the configuration by logging in to an NFS administration host and reading data from and writing data to the SVM. You should then repeat the process as a non-root user on a client system.

What you'll need
  • The client system must have an IP address that is allowed by the export rule you specified earlier.

  • You must have the login information for the root user.

Steps
  1. On the cluster, verify the IP address of the LIF that is hosting the new volume:

    network interface show –vserver svm_name

  2. Log in as the root user to the administration host client system.

  3. Change the directory to the mount folder:

    cd /mnt/

  4. Create and mount a new folder using the IP address of the SVM:

    1. Create a new folder:
      mkdir /mnt/folder

    2. Mount the new volume at this new directory:
      mount -t nfs -o hard IPAddress:/volume_name /mnt/folder

    3. Change the directory to the new folder:
      cd folder

      The following commands create a folder named test1, mount the vol1 volume at the 192.0.2.130 IP address on the test1 mount folder, and change to the new test1 directory:

      host# mkdir /mnt/test1
      host# mount -t nfs -o hard 192.0.2.130:/vol1 /mnt/test1
      host# cd /mnt/test1
  5. Create a new file, verify that it exists, and write text to it:

    1. Create a test file:
      touch filename

    2. Verify that the file exists.:
      ls -l filename

    3. Enter:
      cat > filename

      Type some text, and then press Ctrl+D to write text to the test file.

    4. Display the content of the test file.
      cat filename

    5. Remove the test file:
      rm filename

    6. Return to the parent directory:
      cd ..

      host# touch myfile1
      host# ls -l myfile1
      -rw-r--r-- 1 root root 0 Sep 18 15:58 myfile1
      host# cat >myfile1
      This text inside the first file
      host# cat myfile1
      This text inside the first file
      host# rm -r myfile1
      host# cd ..
  6. As root, set any desired UNIX ownership and permissions on the mounted volume.

  7. On a UNIX client system identified in your export rules, log in as one of the authorized users who now has access to the new volume, and repeat the procedures in steps 3 to 5 to verify that you can mount the volume and create a file.