ONTAP Discussions

How to script commands in a 7-filer? Changing vol option on hundreds of volumes

Northman
1,884 Views

We are currently migrating around 170 thick volumes from a 7-filer mode system to a SVM using 7MT software. Unfortuantely , there is no option (latest version 3.5) to force creation of thin volumes on the destination (the SVM). So we run out of space when we try to run the migration (pre-check error).

 

Netapp support has told us to change all the 7-filer volumes to thin using this command:

vol options <volume> guarantee none.

 

But I will have to enter this command 180 times. Is there a script or a different way to enable thin on these volumes?

 

1 ACCEPTED SOLUTION

Ontapforrum
1,861 Views

For cDOT/ONTAP, its much easier: (Just one command)
::> volume modify -volume * -space-guarantee none

 

For 7-mode, unfortunately, it's not that easy, except scripting  I guess (may be PowerShell but I have never done it). However,  following is also possible.

 

Put all the commands serially in a notepad, and then ctl+A, ctl+c and paste in the putty terminal filer>
vol options vol1 guarantee none
vol options vol2 guarantee none
vol options vol3 guarantee none
vol options vol4 guarantee none

View solution in original post

4 REPLIES 4

Ontapforrum
1,862 Views

For cDOT/ONTAP, its much easier: (Just one command)
::> volume modify -volume * -space-guarantee none

 

For 7-mode, unfortunately, it's not that easy, except scripting  I guess (may be PowerShell but I have never done it). However,  following is also possible.

 

Put all the commands serially in a notepad, and then ctl+A, ctl+c and paste in the putty terminal filer>
vol options vol1 guarantee none
vol options vol2 guarantee none
vol options vol3 guarantee none
vol options vol4 guarantee none

Northman
1,850 Views

Thanks, will try to copy all from text file. After all that is faster than typing everything in CLI.

EWILTS_SAS
1,825 Views

can you run "ssh $filer vol options vol1 guarantee none" and script that?  It's been many years since I've seen 7-mode...

Northman
1,815 Views

yes, I managed to get something similar to work (since I use Windows). 

 

This can be saved as a  .bat file and then run as administrator:

 

@ECHO OFF
cd "C:\Program Files (x86)\PuTTY"
plink.exe root@ipaddr vol options test guarantee none;vol options test2 guarantee none
pause

 

I will probably use this method as it is easier to document all the changes done.

Public