2013-02-14 04:43 AM
is Remove-NaNfsExport similar to exportfs -z
I want to make sure that entries in the exports file are only commented out not removed:
Here is the man page from exportfs:
Unexports a file system path and removes its export entry from the /etc/exports file. Use the -z option to remove a file system path from the /etc/exports file without manually editing the /etc/exports file. Note: By default entries are actually commented out and not removed from the /etc/exports file. To change the behavior to actually remove entries switch off the nfs.export.exportfs_comment_on_delete option. For more information see na_options(1).
Would be nice to get clarification.
2013-02-14 05:46 AM
You can get more help about a powershell cmdlet using
Get-Nahelp Remove-NaNfsExport - Detailed
Here's what the description says about this cmdlet.
PS C:\Windows\system32> Get-Help Remove-NaNfsExport -Detailed
Removes the rules for a set of pathnames.
Remove-NaNfsExport [-Paths] <String> [-Persistent] [-Controller <NaController>] [-WhatIf] [-Confirm]
Remove-NaNfsExport [-AllPaths] [-Persistent] [-Controller <NaController>] [-WhatIf] [-Confirm] [<CommonParameters>]
Removes the rules for a set of pathnames. This returns an error if any of the pathnames don't have a rule. Set the
Persistent option to modify the etc/exports file and keep this change persistent upon reboots.
Pathnames to be deleted from the exports table.
Default value is false. Modify the etc/exports file to delete the rules permanently. CAUTION: If AllPaths
and Persistent are both specified, all exports are removed permanently.
The Data ONTAP controller object, embodied by an NaController object. This parameter is returned by the
Connect-NaController cmdlet. If not specified, the value in the global variable CurrentNaController is used.
Default value is false. Specify to delete all rules. Paths must be left empty if this option is true.
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, see
-------------- Example 1 --------------
C:\PS>Remove-NaNfsExport -Persistent /vol/testvol
Remove the export for volume 'testvol'.