Microsoft Virtualization Discussions

nfs exports

VENKATA09
5,898 Views

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 ?

1 ACCEPTED SOLUTION

VENKATA09
5,898 Views
5 REPLIES 5

JGPSHNTAP
5,898 Views

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

VENKATA09
5,898 Views

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

billyd
5,898 Views

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

JGPSHNTAP
5,898 Views

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

VENKATA09
5,899 Views

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...

Public