Using Excel to Quickly Modify Post 7MTT Transition Export Policy Names

If post 7MTT transition, you want to change NFS Export Policy names as per a standard naming convention (the example below uses EXP_VOLNAME, or EXP_VOLNAME_QTREENAME), a very quick and easy way is possible using Excel:

1) Run the Clustershell command::>


set -showseparator &


2) For Volume Export Policies, run the Clustershell Command::>


vol show -fields policy -junction-path !"-"


And copy and paste the output to a Volumes sheet using “Text Import Wizard” and & as separator.

3) For Qtree Export Policies, run the Clustershell Command::>


qtree show -fields export-policy -qtree !"-"


And copy and paste the output to a Qtrees sheet using “Text Import Wizard” and & as separator.

4) In the Volumes sheet, use the following formula to create the export-policy rename clustershell commands:

="export-policy rename -vserver "&A3&" -policyname "&C3&" -newpolicyname EXP_ "&B3

5) In the Qtrees sheet, use the following formula to create the export-policy rename clustershell commands:

="export-policy rename -vserver "&A3&" -policyname "&D3&" -newpolicyname EXP_"&B3&"_"&C3

6) Filter and manipulate as desired.

7) Copy and paste commands into Clustershell.

THE END

Image: Example from Volumes sheet

Comments