New-EmcVolume

Creates a volume.

 

Syntax

 

Parameters

-HostSystem <IHostSystem>

Attributes: Required, Position: named

Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can get a host system object by using the Get-EmcHostSystem cmdlet. The object can be a stand-alone host system, a virtual machine, or a hypervisor.

 

-HostDisk <Disk>

Attributes: Required, Position: named

Specifies the ESI host disk object, which you can get from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.

 

-AllocationUnitSizeInBytes <UInt32>

Attributes: Optional, Position: named

Specifies the cluster size or allocation unit size of the disk in bytes. This represents the smallest amount of disk space that can be allocated to hold a file. For NTFS file systems, the default value is 65536 bytes. For FAT32, the default value is 4096 bytes.

 

-FileSystemType <PSFileSystemType>

Attributes: Optional, Position: named

Specifies the type of the file system. When MBR is the partition type, valid values are NTFS (New Technology File System) or FAT32 (File Allocation Table 32 bit). For GPT, the valid value is NTFS, which is also the default value.

 

-Label <String>

Attributes: Optional, Position: named

Specifies the volume label.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

Turns off all the informational and verbose messages. However, it still displays errors.

 

-HostLunIdentifier <HostLunIdentifier>

Attributes: Required, Position: named

Specifies the ESI HostLunIdentifier object, which you can get from the ESI host disk object, the ESI cluster disk object, or by using the Get-EmcHostLunIdentifier cmdlet.

 

-ClusterSystem <IClusterSystem>

Attributes: Required, Position: named

Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can get a cluster system object by using the Get-EmcClusterSystem cmdlet.

 

<CommonParameters>

This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. Type get-help about_commonparameters for more details.

 

Examples

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

C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent

C:\PS>$h = Get-EmcHostSystem *.148

C:\PS>Set-EmcLunAccess -Lun $l -HostSystem $h -Available

TaskStatus: Started

 10% : Unmasking the LUN to the specified host(s)...

100% : The specified LUN has been unmasked to the specified initiators...

TaskStatus: Completed

C:\PS>$hd = Find-EmcHostDisk -HostSystem $h -Lun $l -Silent

C:\PS>Initialize-EmcHostDisk -HostDisk $hd -HostSystem $h

C:\PS>New-EmcVolume -HostSystem $h -HostDisk $hd -Label volume_1

This example creates a LUN, unmasks onto a host system, finds the corresponding disk, initializes it, and creates a volume.

 

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

C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -Capacity 2GB -Silent

C:\PS>$c = Get-EmcClusterSystem myclus*

C:\PS>Set-EmcLunAccess -Lun $l -ClusterSystem $c -Available -silent

 

C:\PS>$hd = Find-EmcHostDisk -ClusterSystem $c -Lun $l -Silent

C:\PS>$hd.HostDiskIdentifier

\\?\PhysicalDrive5

 

C:\PS>Initialize-EmcHostDisk -HostDisk $hd -ClusterSystem $c -PartitionStyle gpt

 

C:\PS>New-EmcVolume -ClusterSystem $c -HostDisk $hd -Label volume_1

This example creates a LUN, unmasks onto a cluster system, finds the corresponding disk, initializes it, and creates a volume.

 

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

C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -Capacity 2GB -Silent

C:\PS>$h = Get-EmcHostSystem *.148

C:\PS>Set-EmcLunAccess -Lun $l -HostSystem $h -Available

C:\PS>$hd = Find-EmcHostDisk -HostSystem $h -Lun $l -Silent

 

C:\PS>Initialize-EmcHostDisk -HostDisk $hd -HostSystem $h

C:\PS>$lunIdentifier = Get-EmcHostLunIdentifier -Lun $lun -HostSystem $h

C:\PS>New-EmcVolume -HostSystem $h -HostLunIdentifier $lunIdentifier -Label volume_1

This example creates a LUN, unmasks onto a host system, finds the corresponding disk, initializes it, and creates a volume using the host LUN identifier.