Mount or unmount existing volumes in the NAS namespace

Contributors

A volume must be mounted on the NAS namespace before you can configure NAS client access to data contained in the storage virtual machine (SVM) volumes. You can mount a volume to a junction point if it is not currently mounted. You can also unmount volumes.

About this task

If you unmount and offline a volume, all data within the junction point, including data in volumes with junction points contained within the unmounted volume’s namespace, are inaccessible to NAS clients.

Note

To discontinue NAS client access to a volume, it is not sufficient to simply unmount the volume. You must offline the volume, or take other steps to ensure that client-side file handle caches are invalidated. For more information, see the following Knowledge Base article:https://kb.netapp.com/Advice_and_Troubleshooting/Data_Storage_Software/ONTAP_OS/NFSv3_clients_still_have_access_to_a_volume_after_being_removed_from_the_namespace_in_ONTAP[NFSv3 clients still have access to a volume after being removed from the namespace in ONTAP]

When you unmount and offline a volume, data within the volume is not lost. Additionally, existing volume export policies and SMB shares created on the volume or on directories and junction points within the unmounted volume are retained. If you remount the unmounted volume, NAS clients can access the data contained within the volume using existing export policies and SMB shares.

Steps
  1. Perform the desired action:

    If you want to…​ Enter the commands…​

    Mount a volume

    volume mount -vserver svm_name -volume volume_name -junction-path junction_path

    Unmount a volume

    volume unmount -vserver svm_name -volume volume_name volume offline -vserver svm_name -volume volume_name

  2. Verify that the volume is in the desired mount state: volume show -vserver vserver_name -volume volume_name -fields state,junction-path,junction-active

Examples

The following example mounts a volume named “sales” located on SVM vs1 to the junction point /sales:

cluster1::> volume mount -vserver vs1 -volume sales -junction-path /sales

cluster1::> volume show -vserver vs1 state,junction-path,junction-active

vserver   volume     state     junction-path   junction-active
--------- ---------- -------- --------------- ----------------
vs1       data       online    /data           true
vs1       home4      online    /eng/home       true
vs1       sales      online    /sales          true

The following example unmounts and offlines a volume named “data” located on SVM vs1:

cluster1::> volume unmount -vserver vs1 -volume data
cluster1::> volume offline -vserver vs1 -volume data

cluster1::> volume show -vserver vs1 -fields state,junction-path,junction-active

vserver   volume     state     junction-path   junction-active
--------- ---------- --------- --------------- ---------------
vs1       data       offline   -               -
vs1       home4      online    /eng/home       true
vs1       sales      online    /sales          true