Community

Subscribe
Highlighted
Accepted Solution

nfs exports

Hi All,

I am looking to export exportfs and /etc/exports to excel sheet, is there a way to do this quickly using power shell

Any ideas please ?

Re: nfs exports

I was working on this as well in powershell.. If you need root/rw print out it becomes more difficult.

Easiest way right now is to dump nfs export report from operations manager

Re: nfs exports

thanks JGPSHNTAP

Cna you please advice how to I dump /etc/exports from operations manager ?

I was only able to pull reports at aggr level, volume level, vFiler level but couldn't find a way to dump exports report

Re: nfs exports

Give this a shot:

Get-NaNfsExport | select pathname,@{n="RO";e={$_.SecurityRules.ReadOnly -join ','}},@{n="RW";e={$_.SecurityRules.ReadWrite -join ','}},@{n="Root";e={$_.SecurityRules.root -join ','}} | Export-Csv -LiteralPath C:\work\nfs_shares.csv -NoTypeInformation

The CSV produces this:

PathnameRORWRoot
/vol/alpha3data192.168.100.15

Re: nfs exports

Billy..

Nice work.. I have a thread going in the PS forum.

I forgot to post this as well.. I was doing similiar.. then I stopped because I wanted to build objects,  

Please post it on the other thread.

Thanks

As for the above from operations manager, click file systems - nfs exports

Re: nfs exports

Hi Billy,

Thanks for your reply,

I get different results to yours

JGPSHNTAP, I have tried  below and I got the desired output

https://communities.netapp.com/community/netapp-blogs/msenviro/blog/2013/02/28/extract-nfs-export-rules-from-a-netapp-controller-and-its-v-filers-usin...