Add-EmcHostDiskToCluster

Adds a disk to a cluster.

 

Syntax

 

Parameters

-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 the cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can get the cluster system object by using the Get-EmcClusterSystem cmdlet.

 

-ClusterGroupName <String>

Attributes: Optional, Position: named

Specifies the cluster group name. If the cluster group name is not specified, the cmdlet adds the disk to the available storage group.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

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

 

-AddToClusterSharedVolume <SwitchParameter>

Attributes: Required, Position: named

Adds to the cluster shared volume.

 

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

 

<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 -Capacity 1gb -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

 

C:\PS>$cd = Add-EmcHostDiskToCluster -ClusterSystem $c -HostDisk $hd -ClusterGroupName App1

 

Or

 

C:\PS>$cd = Add-EmcHostDiskToCluster -ClusterSystem $c -HostDisk $hd -ClusterGroupName AvailableStorage

This example creates a LUN, unmasks the LUN to a cluster system, finds the corresponding disk, initializes it, creates a volume, and adds the disk to a cluster. If the cluster group name is specified with AvailableStorage, the disk is added to the available storage group.

 

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

C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -Capacity 1gb -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

 

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

 

C:\PS>$cd = Add-EmcHostDiskToCluster -ClusterSystem $c -HostDisk $hd -AddToClusterSharedVolume

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