|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: New-NcLun
NAME
New-NcLun
SYNOPSIS
Create a LUN by one of two methods: by size or from file.
SYNTAX
New-NcLun [-Path] <String> [-Size] <String> [-OsType <String>] [-Unreserved]
[-PrefixSize <Int64>] [-VserverContext <String>] [-Controller <NcController
[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-NcLun [-Path] <String> -SourceFile <String> [-OsType <String>] [-Unreser
ved] [-VserverContext <String>] [-Controller <NcController[]>] [-WhatIf] [-C
onfirm] [<CommonParameters>]
DESCRIPTION
Create a LUN by one of two methods: by size or from file.
By size: Create a new LUN of given size, with initially zero contents. The
LUN is created at the path given. No file should already exist at the give
n path. The directory specified in the path must be a qtree root directory.
The size of the created LUN may be larger than the size specified, in orde
r to get an integral number of cylinders while reporting the geometry using
SAN protocols.
From file: Create a LUN from an existing file. A new LUN is created at the
given LUN path (which must be at a qtree root). A hard link is created to
the existing file. The file contents are not copied or changed. The file c
an be resized to a larger size, rounding up to a cylinder boundary.
PARAMETERS
-Path <String>
Path of the newly created LUN if successful. This path must not exist al
ready (i.e. a file or directory with this same path).
Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Size <String>
New size for the LUN in bytes. The format to use is: <number>[k|m|g|t]
where the units are optional and "k" means kilobytes, "m" means megabyte
s, "g" means gigabytes, and "t" means terabytes.
Required? true
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-OsType <String>
The OS type for the LUN. The default type if not specified is "image".
It is strongly recommended for the caller of this API to avoid using th
e "image" type because it could result in misconfigured LUNs. For examp
le, a LUN with OS type "image" could suffer major performance penalties
when a Windows host is trying to access it.
The image type of the lun. This value determines the proper alignment se
ttings for the desired host filesystem layout. Possible values:
"aix" - The LUN will be used to store an AIX filesystem
"hpux" - The LUN will be used to store an HP-UX filesystem
"hyper_v" - The LUN will be used to store Hyper-V VHDs (Virtual Hard Dis
ks)
"image" - The default type indicating no assumptions will be made about
the data stored in the LUN
"linux" - The LUN will be used to store a Linux filesystem with no parti
tion table
"netware" - The LUN will be used to store a Netware filesystem
"openvms" - The LUN will be used to store an OpenVMS filesystem
"solaris" - The LUN will be used to store a Solaris filesystem, in a sin
gle slice partition
"solaris_efi" - The LUN will be used to store a Solaris filesystem with
an EFI partition table
"vmware" - The LUN will be used to store a VMware Virtual Machine File S
ystem (VMFS) containing Virtual Machine Disk Files (VMDKs)
"windows" - The LUN will be used to store a Windows filesystem with a Ma
ster Boot Record (MBR) partition table.
"windows_2008" - The LUN will be used to store a Windows filesystem with
a Master Boot Record (MBR) partition table on Windows 2008 or later
"windows_gpt" - The LUN will be used to store a Windows filesystem with
a GUID Partition Table (GPT).
"xen" - The LUN stores Xen data.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Unreserved
By default, the LUN is space-reserved. If it is desired to manage space
usage manually instead, this can be specified which will create a LUN w
ithout any space being reserved.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PrefixSize <Int64>
The size of the prefix stream for this LUN in bytes. Certain OS types s
tore a small portion of the data corresponding to partition tables (or s
imilar structures) in the prefix stream. This is part of the LUN data a
nd is transparent to hosts that access the LUN via block protocols. The
default size is based on the OS type. Giving a value here overrides th
e default, but it is strongly recommended to avoid changing this default
size. The value in this field must be a multiple of 512 bytes. Note t
hat this value has no effect when the OS type is "image".
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
-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
-SourceFile <String>
A fully qualified path to the file to create the LUN from. This must be
in the same qtree as the LUN being created.
Required? true
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.Lun.LunInfo
NOTES
Category: lun
API: lun-create-by-size, lun-create-from-file
Family: vserver
-------------- Example 1 --------------
C:\PS>New-NcLun /vol/bigvol/ExchangeTest 20gb -Unreserved
Create a new LUN of 20 GB.
Protocol : image
Thin : True
Vserver : vserver1
Volume : bigvol
Qtree :
Path : /vol/bigvol/ExchangeTest
NcController : 10.61.172.155
Alignment : indeterminate
BackingSnapshot :
BlockSize : 512
CloneBackingSnapshot :
Comment :
CreationTimestamp : 1317421474
CreationTimestampDT : 9/30/2011 10:24:34 PM
DeviceBinaryId :
DeviceId :
DeviceTextId :
IsSpaceAllocEnabled : False
IsSpaceReservationEnabled : False
Mapped : False
MultiprotocolType : image
Online : True
PrefixSize : 0
ReadOnly : False
SerialNumber : 1k/T2$-sjT2Q
ShareState : none
Size : 21474836480
SizeUsed : 0
Staging : False
SuffixSize : 0
Uuid : f9d8d3ce-ebb2-11e0-8b71-123478563412
DeviceIdSpecified : False
IsSpaceAllocEnabledSpecified : True
IsSpaceReservationEnabledSpecified : True
MappedSpecified : True
OnlineSpecified : True
ReadOnlySpecified : True
StagingSpecified : True
RELATED LINKS
Get-NcLun
Remove-NcLun
| Copyright © 2012 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|