Provisioning a new storage volume

The following script is an example of how to:

 

Example script

PS C:\Users\administrator.BROOKSDOM> import-module esipstoolkit

PS C:\Users\administrator.BROOKSDOM> $pool = Get-EmcStoragePool "VM Pool"

Block storage system: [Name = APM00111102550. UserFriendlyName = VNX5100]. Lun Pools are not initialized. Refreshing Lun

Pools.

PS C:\Users\administrator.BROOKSDOM> $system = Get-EmcHostSystem NEC-BLADE6

PS C:\Users\administrator.BROOKSDOM> $lun = New-EmcLun -Pool $pool -CapacityInMB 102400 -Thin

TaskStatus: Started

10% : Creating the LUN...

100% : The specified LUN has been created...

TaskStatus: Completed

PS C:\Users\administrator.BROOKSDOM> Set-EmcLunAccess -Lun $lun -HostSystem $system -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

PS C:\Users\administrator.BROOKSDOM> $hdisk=Get-EmcHostDisk -

Host: NEC-BLADE6. Refreshing MultiPath software information.

Host: NEC-BLADE6. Retrieving disk information from Virtual Disk Service.

WARNING: Unable to find host disk(s) with the given parameters

PS C:\Users\administrator.BROOKSDOM> $hdisk=Get-EmcHostDisk -HostSystem $system -Lun $lun

PS C:\Users\administrator.BROOKSDOM> Initialize-EmcHostDisk -HostSystem $system -HostDisk $hdisk -PartitionStyle GPT

TaskStatus: Started

10% : Initializing the disk...

100% : The specified disk has been initialized...

TaskStatus: Completed

PS C:\Users\administrator.BROOKSDOM> $vol =New-EmcVolume -HostSystem $system -HostDisk $hdisk -FileSystemType NTFS -Labe

l TestVolume

TaskStatus: Started

10% : Provisioning the volume...

100% : The specified volume has been provisioned...

TaskStatus: Completed

PS C:\Users\administrator.BROOKSDOM> Get-EmcAvailableDriveLetter -HostSystem $system

A, B, D, E, F, … (up to Z, except for default C)

PS C:\Users\administrator.BROOKSDOM> Set-EmcVolumeMountPoint -HostSystem $system -Volume $vol -DriveLetter Z

TaskStatus: Started

10% : Mounting the volume...

100% : The specified volume has been mounted...

TaskStatus: Completed

PS C:\Users\administrator.BROOKSDOM>