Active IQ Unified Manager Discussions
Active IQ Unified Manager Discussions
Hello,
I have a few questions about some things we would like to be able to do with WFA.
1) How can I remove a particular server from an export entry using a command?
2) Could the netgroups file be changed via WFA in the same way an export is?
Thanks
Hi Branden,
You mean delete export from /etc/exports?
Can you check if "remove export" command will help you for your first point?
Rajeev
Hi,
try this link.you have workflow available for the NFS management.you can import and customize as per your requirement.
https://communities.netapp.com/docs/DOC-14409
Regards
Srinvas Rao.
Thanks for this. The pirate pack was quite helpful but it still does not do what I would like to. At least as far as I can see.
When we have retired hosts, we want to remove just those specifically from an export but leave the rest of the exports there.
Right now we have to manually edit this file with something like Notepad++ to do so. I was hoping I could leverage WFA to do this.
For example:
/vol/NFS_Test5 -sec=sys,rw=192.168.123.123:testhost,root=192.168.123.123:testhost
Say I just want to remove testhost but leave 192.168.123.123 there. I don't want to delete the entire export.
Any ideas?
Anyone made progress on this request?... I also would like to remove only a particular host or set of hosts from an export (not the entire thing).
Let me know if there is any update.
Thanks!
I've wondered how to do this too with the exportfs command but as far as I can tell it isn't possible. If you look at the man page for exportfs:
https://library.netapp.com/ecmdocs/ECMP1196462/html/cmdref/man1/na_exportfs.1.html
There doesn't appear to be any way to remove a single client from a given line in the /etc/exports file. So unless there is some extra functionality built into API calls that manage NFS exports I don't see how WFA would be able to do something that isn't already possible via the command line. You should still get NetApp confirmation but this is my take...
I was pondering the possibilities myself... While there's no command that will allow you to explicitly pull out a single host from an export, you could use 'export -io' to re-write the export with the updated RW/R/Root hosts info. So, we do have the ability do pull this off assuming we could somehow capture the updated entries minus the host(s) entered.
Being new to WFA for the most part, I'm not quite sure of how this could be done. I explored the 'Update Export' command a bit to see if I could wrap my head around what's happening -
It appears that we are creating a new line for each security entry and appending the new host entry to that -
# get the rule for the provided export
$securityRule = $export.SecurityRules[0]
$newRoots = PrepareHosts -ListType Root -SecurityRuleInfo $securityRule -NewHosts $RootHosts
$newRWHosts = PrepareHosts -ListType ReadWrite -SecurityRuleInfo $securityRule -NewHosts $RWhosts
$newROHosts = PrepareHosts -ListType ReadOnly -SecurityRuleInfo $securityRule -NewHosts $ROhosts
Looks like this one may have to be done via perl unless someone has any other way to spin this.
If I was going to do something outside of PowerShell, I'm thinking that I would opt for updating the /etc/netgroup and using netgroups for my exports instead. In my case, we would likely have to update several exports via WFA using the current command just to say add a new ESX host into the mix whereas a netgroup would make only one point of touch to update all exports associated with a particular VMware instance's datastores in a single flow.
Anyone else gone this route?
Thanks!
Rusty et all,
I have been pretty busy getting things moving in the clustered ONTAP space and prepared for VMworld (Wait until you see the new stuff I am coming out with). I decided that since this seems to be a pretty hot request, that I would take a look at everything and figure out the easiest update. I have updated the Pirate Pack for Shared NAS for traditional Data ONTAP v2.0 to now allow for individual host management of NFSv3 Exports. I have also posted this command as a separate DAR - Command: Remove Host from NFS Export - 7DOT
Jeremy Goodrum, NetApp
The Pirate
Twitter: @virtpirate
Blog: www.virtpirate.com
Branden Taber wrote:
Thanks for this. The pirate pack was quite helpful but it still does not do what I would like to. At least as far as I can see.
When we have retired hosts, we want to remove just those specifically from an export but leave the rest of the exports there.
Right now we have to manually edit this file with something like Notepad++ to do so. I was hoping I could leverage WFA to do this.
For example:
/vol/NFS_Test5 -sec=sys,rw=192.168.123.123:testhost,root=192.168.123.123:testhost
Say I just want to remove testhost but leave 192.168.123.123 there. I don't want to delete the entire export.
Any ideas?
to remove only single hosts 192.168.123.123. Run below mentioned command on CLI.
Run exportfs -p sec=sys,rw=testhost,root=testhost /vol/NFS_Test5