Sunday, August 29, 2010
Execute command from a file on Ontap
bash>for $i in vol1
>do
>snap sched $i 0
>snap reserve $i 0
>blah $i
>blah $i
>done
and everything would be done, but imagine how would you do if you are doing through console. Unfortunately Ontap doesn't supports any kind of script not even for loop so we have to run each and every line of command either by typing on console or doing a copy-paste from text file from our desktop.
However there is a better way, use notepad to create set of command as you would execute on console with correct order, copy it off to filer and use 'source' command to execute each and every line from it. I know it's not such a brilliant idea as still you have to copy and paste everything to a file on filer however it's wee better than executing each and every command on console.
Think about you have to re-run /etc/rc so either you can use 'rdfile /etc/rc' to print everything on console and copy all the the line and execute on console or just run 'source /etc/rc' and let it run all the commands for you. You can also use 'source -v /etc/rc' to print the commands on console but not to execute, just to get an idea if there are any junk characters or any unwanted command inside the file, just as a precaution you better be sure that all the commands are valid and correct as if a command fails source doesn't stops there and just goes to next command in list.
Use it and I am sure you will like it next time when you are making some changes on filer which needs ten different commands to be executed.
Saturday, June 26, 2010
Operations Manager Efficiency Plugin
Update:
Just noticed a video showing features of plugin on netapp community site http://communities.netapp.com/videos/1209
Saturday, January 9, 2010
How to get the list of domain users added to filer without fiddling with SID
There were numerous time when I wanted to see an AD user’s permission on filer however just to locate that user on system itself took me a lot of time. Why? Because Ontap shows domain users added to system in SID format rather than their names which is very much annoying as when it dumps the SIDs on screen then we have to use ‘cifs lookup’ command to hunt for the user I am looking for from that bunch of SIDs.
So here’s a little handy unix script to see the list of all AD users added on filers in their username format rather then SIDs
I have already setup a password less login to filer therefore I haven’t added the username and password fields however if you haven’t done that add your login credentials after name of the filer in below command.
rsh
Now this command will display the AD users added in Administrator group however if you want to see users from any other group replace the Administrators word with group name on your screen.