Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP 7-mode documentation.

Cmdlet: New-NcVol


NAME
New-NcVol

SYNOPSIS
Create a volume.

SYNTAX
New-NcVol [-Name] <String> [-Aggregate] <String> [-JunctionPath] <String> [-
Comment <String>] [-AntivirusOnAccessPolicy <String>] [-ExportPolicy <String
>] [-FlexCacheCachePolicy <String>] [-FlexCacheFillPolicy <String>] [-FlexCa
cheOriginVolume <String>] [-GroupId <Int32>] [-IndexDirectoryFormat [<Boolea
n>]] [-JunctionActive [<Boolean>]] [-MaxDirectorySize <Decimal>] [-NvFailEna
bled [<Boolean>]] [-SecurityStyle <String>] [-SnapshotPolicy <String>] [-Spa
ceReserve <String>] [-State <String>] [-Type <String>] [-UnixPermissions <St
ring>] [-UserId <Int32>] [-VserverRoot [<Boolean>]] [-SnapshotReserve <Int32
>] [-VmAlignSector <Int32>] [-VmAlignSuffix <String>] [-VserverContext <Stri
ng>] [-Controller <NcController[]>] [-Size] <String> [-WhatIf] [-Confirm] [<
CommonParameters>]


DESCRIPTION
Create a volume.


PARAMETERS
-Name <String>
Name of the volume to create. The volume name can contain letters, numb
ers, and the underscore character (_), but the first character must be a
letter or an underscore. The volume names must be unique within a vser
ver.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Aggregate <String>
The name of the aggregate in which to create the new flexible volume.

Required? true
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-JunctionPath <String>
The Junction Path at which this volume is to be mounted. The fully-qual
ified pathname in the owning vserver's namespace at which a volume is mo
unted. The pathname is case insensitive and must be unique within a vse
rver's namespace. Note that this pathname may itself contain junctions,
one for each volume (other than the namespace root volume) that provide
s storage along the pathname's length. As with all fully-qualified path
names, this string must begin with '/'. In addition, it must not end wi
th '/'. An example of a valid junction path is: '/user/my_volume'. Onl
y one volume can be mounted at any given junction path.

This is a mandatory parameter, but for DP volumes that don't support a j
unction path, specify $null.

Required? true
Position? 4
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Comment <String>
A description for the volume being created.

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

-AntivirusOnAccessPolicy <String>
The name of the Anti-Virus On-Access policy. The default policy name is
'default'. If not specified when creating a volume, the Anti-Virus On-A
ccess Policy is inherited from the owning vserver.

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

-ExportPolicy <String>
The name of the Export Policy to be used by NFS/CIFS protocols. The def
ault policy name is 'default'.

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

-FlexCacheCachePolicy <String>
The name of the FlexCache cache policy. The default policy name is 'def
ault'. This policy applies only to FlexCache volumes.

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

-FlexCacheFillPolicy <String>
The name of the FlexCache prefill policy. The default policy name is 'd
efault'.

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

-FlexCacheOriginVolume <String>
The name of the origin volume that contains the authoritative data. Thi
s field is valid only for a FlexCache volume. The origin volume must bel
ong to the same vserver that owns this volume.

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

-GroupId <Int32>
The UNIX group ID for the volume. The default value is 0 ('root').

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

-IndexDirectoryFormat [<Boolean>]
If true, index directory format is enabled. Default: false.

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

-JunctionActive [<Boolean>]
This field indicates whether the mounted volume is accessible. The defa
ult is true. If the mounted junction path is not accessible, the volume
does not appear in the owning virtual server's namespace.

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

-MaxDirectorySize <Decimal>
The maximum size (in bytes) to which any directory in this volume can gr
ow. The default setting is 100 MBytes and it allows the directory to ho
ld up to approximately 3,000,000 files. The number of files that the di
rectory actually can hold varies depending on such things as the length
of the names and whether it needs to use double-byte UNICODE characters.
Most users should not need to change this field's default setting. It
is useful for environments where system users may grow a directory to a
size that starts impacting system performance. When a user tries to cr
eate a file in a directory that is at the limit, the system returns an e
rror and fails the create.

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

-NvFailEnabled [<Boolean>]
If true, the controller performs additional work at boot and takeover ti
mes if it finds that there has been any potential data loss in this volu
me due to an NVRAM failure. The volume would be put in a special state
called 'in-nvfailed-state' such that protocol access is blocked. This w
ill cause the client applications to crash and thus prevent access to st
ale data on the volume. To get out of this situation, the admin needs t
o manually clear the 'in-nvfailed-state' on the volume. By default, thi
s value is false.

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

-SecurityStyle <String>
The security style associated with this volume. Possible values:

mixed - Mixed-style security
ntfs - NTFS/Windows-style security
unix - Unix-style security (default setting

Security styles don't apply to GX-striped data volumes.

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

-SnapshotPolicy <String>
The name of the snapshot policy. The default policy name is 'default'.

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

-SpaceReserve <String>
Specifies the type of volume guarantee the new volume will use. Possibl
e values: none, file, volume. If this argument is not provided, the def
ault volume guarantee type is volume.

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

-State <String>
Desired state of the volume after it is created. Possible values: onlin
e, restricted, offline.

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

-Type <String>
The type of the volume to be created. Possible values:

rw - read-write volume (default setting)
ls - load-sharing volume
dp - data-protection volume
dc - data-cache volume (FlexCache)

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

-UnixPermissions <String>
Unix permission bits in octal string format. It's similar to Unix style
permission bits: for security style "mixed" or "unix", the default sett
ing of '0700' gives read/write/execute permissions to owner and no permi
ssions to group and other users. For security style "ntfs", the default
setting of '0000' gives no permissions to owner, group and other users.
It consists of 4 octal digits derived by adding up bits 4, 2 and 1. O
mitted digits are assumed to be zeros. First digit selects the set user
ID(4), set group ID (2) and sticky (1) attributes. The second digit se
lects permission for the owner of the file: read (4), write (2) and exec
ute (1); the third selects permissions for other users in the same group
; the fourth for other users not in the group.

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

-UserId <Int32>
The UNIX user ID for the volume. The default value is 0 ('root').

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

-VserverRoot [<Boolean>]
If true, this volume is the namespace root volume of the vserver which o
wns this volume. The default value is false. When creating a volume, i
f this field is set to true, the new volume is to become the new namespa
ce root volume of the vserver. This field can be used in a recovery sce
nario in which the namespace root volume of the vserver becomes unrecove
rable.

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

-SnapshotReserve <Int32>
The percentage of disk space that has to be set aside as reserve for sna
pshot usage. The default value is 5. Range : [0..90]

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

-VmAlignSector <Int32>
The Virtual Machine alignment 512 byte sector number. All files created
with the suffix specified in the VmAlignSuffix parameter will have zero-
filled <512 * VmAlignSector> bytes data at the beginning so that it's ac
tual data starts at a different offset instead of zero. This is done so
that the read & writes to such files are aligned to WAFL's 4k block boun
dary.

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

-VmAlignSuffix <String>
The Virtual Machine alignment suffix. The suffix such as '.xyz' is used
to identify the files which needs to be aligned.

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

-VserverContext <String>
Vserver to which to direct this command. If the currently connected con
troller (as embodied by an NcController object) represents a cluster, th
ere are multiple means to address commands to one of its vservers. Eith
er set the Vserver field on the NcController object to direct all subseq
uent commands to that vserver, or supply the VserverContext parameter to
an individual cmdlet. Only cmdlets which may be invoked on vservers of
fer the VserverContext parameter.

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

-Controller <NcController[]>
A clustered Data ONTAP controller to receive this cmdlet, as embodied by
an NcController object. This parameter is returned by the Connect-NcCo
ntroller cmdlet. If not specified, the value in the global variable Cur
rentNcController is used. In the latter case, if CurrentNcController co
ntains a collection of NcController objects, this cmdlet is invoked on e
ach controller in succession.

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

-Size <String>
The initial size of the new flexible volume. The format to use is: <num
ber> k|m|g|t where "k" means kilobytes, "m" means megabytes, "g" means g
igabytes, and "t" means terabytes.

Required? true
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
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

<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
DataONTAP.C.Types.Volume.VolumeAttributes


NOTES


Category: volume
API: volume-create
Family: vserver

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

C:\PS>New-NcVol vol2 aggr1 10g -JunctionPath /vol2


Create a new volume 'vol2'.


Name State TotalSize Used Available Dedupe Aggregate Vserver
---- ----- --------- ---- --------- ------ --------- -------
vol2 online 10.0 GB 5% 9.5 GB False aggr1 vserver1



RELATED LINKS
Get-NcVol







 Data ONTAP® PowerShell Toolkit