|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: Set-NaVol
NAME
Set-NaVol
SYNOPSIS
Set the specified volume online, offline, or restricted.
SYNTAX
Set-NaVol [-Name] <String> [-Online] [-Controller <NaController>] [-WhatIf]
[-Confirm] [<CommonParameters>]
Set-NaVol [-Name] <String> [-Offline] [-CifsDelaySeconds <Int64>] [-Controll
er <NaController>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-NaVol [-Name] <String> [-Restricted] [-CifsDelaySeconds <Int64>] [-Contr
oller <NaController>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Set the specified volume online, offline, or restricted.
Online: Bring the specified volume or the plex online. This command takes ef
fect immediately. If there are CIFS shares associated with the volume, they
are enabled.
Offline: Take the specified volume or plex offline, making it unavailable fo
r both user-level data access and RAID-level access (unless it's a flexible
volume, at which time its containing aggregate is not affected in any way, a
nd will remain fully online). The operation takes effect before the API retu
rns except in maintenance mode, when the current root volume may not be take
n offline. A volume marked to become the root cannot be taken offline. Tak
ing a flexible volume offline does not affect its containing aggregate in an
y way.
A number of operations being performed on the given volume (or its containin
g aggregate) can prevent this operation from succeeding, either at all or fo
r various lengths of time. If such operations are found, the system waits u
p to one second for them to finish. If they don't, the command is aborted.
A check is also made for files on the volume opened by internal ONTAP proces
ses. The command is aborted if any are found.
Restricted: Restrict the specified volume, making it unavailable for user-le
vel data access but leaving it (or its containing aggregate, if it's a flexi
ble volume) available to internal OnTAP RAID-level access.
PARAMETERS
-Name <String>
Name of an existing volume or plex.
Online: If a volume is specified, it must be currently offline, restrict
ed, or foreign. If the volume is foreign, it will be made native before
being brought online. A ``foreign'' volume is a traditional volume tha
t consists of disks moved from another filer and that has never been bro
ught online on the current filer. Traditional volumes that are not fore
ign are considered ``native.'' If the volume is inconsistent, but has n
ot lost data, it is advisable to run WAFL_check or wafliron (or do a 'sn
apmirror initialize' in case of a replica volume) prior to bringing an i
nconsistent volume online. Bringing an inconsistent volume online increa
ses the risk of further file system corruption. If the volume is incons
istent and has experienced possible loss of data, it cannot be brought o
nline unless WAFL_check or wafliron (or 'snapmirror initialize') has bee
n run on the volume.
If a plex is specified, the plex must be part of an online mirrored trad
itional volume or aggregate. The system will initiate resynchronization
of the plex as part of online processing.
Offline: If a volume contains CIFS shares, users should be warned before
taking the volume offline. Use 'CifsDelaySeconds' to specify number of
seconds to wait.
If a plex is specified, the plex must be part of a mirrored volume, and
both plexes must be online. Prior to offlining a plex, the system will
flush all internally-buffered data associated with the plex and create a
snapshot that is written out to both plexes. The snapshot allows for e
fficient resynchronization when the plex is subsequently brought back on
line.
Restricted: Name of the volume to restrict.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Online
Set the volume online.
Required? false
Position? named
Default value
Accept pipeline input? false
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
-WhatIf
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Offline
Set the volume offline.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CifsDelaySeconds <Int64>
If a volume contains CIFS shares, users should be warned before setting
the volume offline/restricted. This argument specifies the number of mi
nutes to delay before setting the volume offline/restricted, during whic
h time CIFS users are warned of the pending loss of service. A 'CifsDel
aySeconds' time of 0 means that the volume is to be set offline/restrict
ed immediately without issuing any warnings. CIFS users can lose data i
f they are not given a chance to terminate applications gracefully. By
default, the value of 'CifsDelaySeconds' is 0.
Required? false
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Restricted
Set the volume restricted.
Required? false
Position? named
Default value
Accept pipeline input? false
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
NetApp.Ontapi.Filer.Volume.VolumeInfo
NOTES
Category: volume
API: volume-online, volume-offline, volume-restrict
-------------- Example 1 --------------
C:\PS>Set-NaVol vol10 -Restricted
Set volume 'vol10' to Restricted.
ChecksumStyle : block
CloneChildren :
CloneParent : {clone_vol2clone.2}
ContainingAggregate : aggr1
DiskCount : 8
FilesTotal : 0
FilesUsed : 0
IsChecksumEnabled : True
IsInconsistent : False
IsSnaplock : False
IsUnrecoverable : False
MirrorStatus : unmirrored
Name : vol10
PercentageUsed : 0
PlexCount : 1
Plexes : {/aggr1/plex0}
QuotaInit : 0
RaidSize : 16
RaidStatus : raid_dp
Reserve : 101180891136
ReserveRequired : 0
ReserveUsed : 0
Sis :
SizeAvailable : 0
SizeTotal : 0
SizeUsed : 0
SnaplockType :
SpaceReserve :
SpaceReserveEnabled :
State : restricted
Type : flex
Uuid : f7b5f966-11b4-11df-9caa-00a09806c227
IsUnrecoverableSpecified : True
PercentageUsedSpecified : True
SpaceReserveEnabledSpecified : False
RELATED LINKS
Get-NaVol
| Copyright © 2012 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|