Netapp 7m Exports to cDot Export Policy convert script

safety.pl

A coworker asked me this afternoon if I could whip up a script to convert hundreds of volumes, many client, 7-mode /etc/exports files into Clustered Mode Export Policies and client rules.

No problem! Nothing is too hard for some ugly bash scripting.

Now, this first version is pretty brute force, and doesn’t handle all security styles. It’s just to get them in there with each client as it’s own rule. It assumes volumes are already created on mounted on the root of the namespace. It’s also poorly tested 😉

Sample exports file:

 

Save that into the same directory as my script.

Run it, and this is what it dumps out.

Ta Da!!! There you have it. Copy and paste it into the cli. Next up will be some tweaks, and updating it to powershell.

Be Sociable, Share!

, , , , ,