The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to register at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

ONTAP Discussions

Removing a policy from a volume CLI ?


I recently assigned an export policy to a volume using the command:


volume modify -volume VOLUME_NAME -vserver VSERVER_NAME -policy EXPORT_POLICY_NAME


Does anyone know how to undo this action as the volume has been built on the wrong cluster.


I cannot find anything in the documentation on how to remove a policy from a volume or to remove a volume from a policy.


Is it a namespace command? Easy from the GUI but I dont want to use the GUI.


I've worked it out:


vol unmount -vserver VSERVER_NAME -volume VOLUME_NAME


::> vol create -vserver nfs01 -volume rpetertest04 -aggregate aggr2_SATA -size 2g
[Job 15009] Job succeeded: Successful

::> vol show -vserver nfs01 -volume rpetertest04 -fields policy 
vserver volume       policy  
------- ------------ ------- 
nfs01   rpetertest04 default

::> vol show -vserver nfs01 -volume rpetertest04                               

                                   Vserver Name: nfs01
                                    Volume Name: rpetertest04
                                 Aggregate Name: aggr2_SATA
                                    Volume Size: 2GB
                             Volume Data Set ID: 1958
                      Volume Master Data Set ID: 2147485608
                                   Volume State: online
                                    Volume Type: RW
                                   Volume Style: flex
                         Is Cluster-Mode Volume: true
                          Is Constituent Volume: false
                                  Export Policy: default
                                        User ID: 0
                                       Group ID: 0
                                 Security Style: unix
                               UNIX Permissions: ---rwxr-xr-x
                                  Junction Path: -

Since every volume must have an export policy. As you can see, even if you haven't

specify the eport policy while you create a volume, ontap will select the default one for you. 


So if you like to revert what you did.. just modify and assign the "default" export policy 

the same way as you did.



NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner