Data ONTAP® PowerShell Toolkit

Switch to clustered Data ONTAP documentation.

Cmdlet: Enable-NaNfsExportFence


NAME
Enable-NaNfsExportFence

SYNOPSIS
Enables fencing to the given exports for the given entry.

SYNTAX
Enable-NaNfsExportFence [-Persistent] -Hosts <String[]> -Paths <String[]> [-
Controller <NaController>] [<CommonParameters>]

Enable-NaNfsExportFence [-Persistent] -AllPaths -Hosts <String[]> [-Controll
er <NaController>] [<CommonParameters>]

Enable-NaNfsExportFence [-Persistent] -AllPaths -AllHosts [-Controller <NaCo
ntroller>] [<CommonParameters>]

Enable-NaNfsExportFence [-Persistent] -AllHosts -Paths <String[]> [-Controll
er <NaController>] [<CommonParameters>]


DESCRIPTION
Enables fencing to the given exports for the given entry. This means that th
e entry will not have write permission to the exports. The rule changes take
effect immediately. Set the persistent option to true to save the rule in t
he /etc/exports file and keep the option persistent upon loading or reboot.


PARAMETERS
-Persistent
Default value is false. If true, modifies the etc/exports file to append
the rule for a permanent change. (The new rule still takes effect immed
iately.) If false, only change the exports in memory.

Required? false
Position? named
Default value false
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Hosts <String[]>
An array of hostnames which are to be fenced off.

A hostname can be ONE of the following formats.

* machine-name: Alphanumeric string based on DNS.
* netgroup: Alphanumeric string describing a group of machine names
* IP: An IPV4 address in dotted decimal format AAA.BBB.CCC.DDD
* IPv6: An IPv6 address in RFC 2732 format [AAAA:BBBB::GGGG]
* IPv4 subnet: "[network] subnet [netmask] netmask"
* IPv4/v6-subnet: IP/numbits. The IP is a subnet number and the numbits
specifies the size of the subnet by the number of leading bits of the n
etmask.
* dns: A DNS domain. An Alphanumeric starting with a '.'

Required? true
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Paths <String[]>
An array of paths which are to be fenced off.

Required? true
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Controller <NaController>
The Data ONTAP controller object, embodied by an NaController object. T
his parameter is returned by the Connect-NaController cmdlet. If not sp
ecified, the value in the global variable CurrentNaController is used.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-AllPaths
Default value is false. Set to true to fence all rules. Paths must be le
ft empty if this option is true.

Required? true
Position? named
Default value false
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-AllHosts
Default value is false. Set to true to fence all hosts. Hosts must be le
ft empty if this option is true.

Required? true
Position? named
Default value false
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS



NOTES


Category: nfs
API: nfs-exportfs-fence-enable

-------------- Example 1 --------------

C:\PS>Enable-NaNfsExportFence -Persistent -Hosts 10.10.10.10 -AllPaths


Fence all exports from host 10.10.10.10.





-------------- Example 2 --------------

C:\PS>Enable-NaNfsExportFence -Persistent -Paths /vol/vol2 -AllHosts


Fence /vol/vol2 from all hosts.





-------------- Example 3 --------------

C:\PS>Enable-NaNfsExportFence -Persistent -Paths /vol/vol2 -Hosts .mycorp.co
m


Fence all hosts at .mycorp.com from the /vol/vol2 export.






RELATED LINKS
Get-NaNfsExport
Disable-NaNfsExportFence







 Data ONTAP® PowerShell Toolkit