|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: New-NaLun
NAME
New-NaLun
SYNOPSIS
Create a lun by one of three methods: by size, from file, or from snapshot.
SYNTAX
New-NaLun [-Path] <String> [-Type <String>] [-Unreserved] [-Size] <String> [
-Controller <NaController>] [<CommonParameters>]
New-NaLun [-Path] <String> [-Type <String>] [-Unreserved] -FileName <String>
[-Controller <NaController>] [<CommonParameters>]
New-NaLun [-Path] <String> [-Type <String>] [-Unreserved] -SnapshotLunPath <
String> [-Controller <NaController>] [<CommonParameters>]
DESCRIPTION
Create a lun by one of three methods: by size, from file, or from snapshot.
By size: Create a new lun of given size, with initially zero contents. The
lun is created at the lun_path given. No file should already exist at the gi
ven lun_path. The directory specified in the lun_path must be a qtree root d
irectory. The size of the created lun could be larger than the size specifie
d, in order to get an integral number of cylinders while reporting the geome
try 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 t
he existing file. The file contents are not copied or changed. The file can
be resized to a larger size, rounding up to a cylinder boundary.
From snapshot: Creates a LUN in the active file system. The lun has the sam
e initial contents as the referenced snapshot copy of an existing lun. (Note
that no copy of the data is made.) Future writes go into the new lun. Reads
of unmodified data are satisfied from the snapshot location. Reads of modi
fied data are satisfied by first attempting to find the required buffer in t
he new lun. If a buffer is not found (buffer corresponds to a hole), it is
looked for in the snapshot copy instead.
PARAMETERS
-Path <String>
Path of the LUN.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Type <String>
The OS type for the LUN. While optional, the caller should specify a no
n-default ostype. Please see Note below. Currently, supported ostypes
are "solaris" (the lun will be used to store a Solaris raw disk in a sin
gle-slice partition), "windows" (the lun will be used to store a raw dis
k device in a single-partition Windows disk), "hpux" (the lun will be us
ed to store HP-UX data), "aix" (the lun will be used to store AIX data),
"linux" (the lun will be used to store a Linux raw disk without any par
tition table), "netware" (the lun will be used to store NetWare data), "
vmware" (the lun will be used to store VMWARE data), "windows_gpt" (the
lun will be used to store Windows data using the GPT (GUID Partiton Type
) partitioning style), "windows_2008" (the lun will be used to store Win
dows data on Windows 2008 systems), "openvms" (the lun will be used to s
tore OpenVMS data), "xen" (the lun will be used to store Xen data), "hyp
er_v" (the lun will be used to store Hyper-V data), "solaris_efi" (the l
un will be used to store Solaris_EFI data), "image" (the default ostype,
indicating that no assumptions can be made about the contents in the lu
n). If the ostype argument is properly specified to reflect the use to
which the lun will be put, it will be possible to access the same data (
raw disk data) over both SCSI and network file system protocols: NFS, CI
FS, DAFS.
*NOTE* It is strongly recommended for the caller of this API to avoid us
ing the "default" type because it could result in misconfigured LUNs. F
or example, a lun with ostype "default" could suffer major performance p
enalties when a Windows host is trying to access it. The caller should
obtain as much information about the OS types for which the luns are bei
ng created.
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, specify -Unreserved which will create a LUN with
out any space being reserved.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Size <String>
New size for the LUN in bytes. The format to use is:
<number>[k|m|g|t]
where "k" means kilobytes, "m" means megabytes, "g" means gigabytes, and
"t" means terabytes. If no units are specified, the number is interpre
ted as the number of bytes. For example: 10g, 1.5tb, 20GB.
Required? true
Position? 2
Default value
Accept pipeline input? true (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
-FileName <String>
A fully qualified filer path to the file to create the LUN from. This m
ust be in the same qtree as the LUN being created.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SnapshotLunPath <String>
LUN path in the snapshot to be created from.
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.Types.Lun.LunInfo
NOTES
Category: lun
API: lun-create-by-size, lun-create-from-file, lun-create-from-snapshot
-------------- Example 1 --------------
C:\PS>New-NaLun /vol/vol2/lun101 10gb -Type vmware -Unreserved
Create a 10 GB LUN for vmware using thin provisioning.
BackingSnapshot :
BlockSize : 512
IsSpaceReservationEnabled : False
Mapped : False
MultiprotocolType : vmware
Online : True
Path : /vol/vol2/lun101
ReadOnly : False
SerialNumber : HnSolJYm16dg
ShareState : none
Size : 10001317888
Uuid : 494086ce-b6a7-11df-8ac9-00a09806c227
Comment :
RELATED LINKS
Get-NaLun
| Copyright © 2013 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|