Initialize-EmcHostDisk

Initializes a host disk by bringing the disk online and setting a specified partition style in a host or cluster system.

 

Syntax

 

Parameters

-PartitionStyle <PSPartitionStyle>

Attributes: Optional, Position: named

Specifies the partition style. Valid values are Mbr and Gpt. The default value is Mbr.

 

-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.

 

-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.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

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

 

-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

This example creates a LUN, unmasks onto a host system, finds the corresponding disk, and initializes it, which by default is set to the partition style of Mbr.

 

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

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

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

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

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

C:\PS>$hd.HostDiskIdentifier

\\?\PhysicalDrive5

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

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