Remove-EmcHostDiskFromCluster

Removes a disk from a cluster.

 

Syntax

 

Parameters

-ClusterDisk <WindowsBasicClusterDisk>

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.

 

-Force <SwitchParameter>

Attributes: Optional, Position: named

Allows the cmdlet to continue without asking for user confirmation.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

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

 

-WhatIf <SwitchParameter>

Attributes: Optional, Position: named

Describes what would happen if you executed the command without actually executing the command.

 

-Confirm <SwitchParameter>

Attributes: Optional, Position: named

Prompts you for confirmation before executing the command.

 

-ClusterSystem <IClusterSystem>

Attributes: Required, Position: named

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

 

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

 

-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>Get-EmcClusterSystem | Update-EmcSystem -Silent

C:\PS>$cd = Get-EmcClusterDisk cluster*33*

C:\PS>$cd.ClusterDiskResourceName

Cluster Disk 3314428452

 

C:\PS>Remove-EmcHostDiskFromCluster -ClusterDisk $cd -Silent

 

Confirm

Are you sure you want to perform this action?

Performing operation "Remove-EmcDiskFromCluster" on Target "[Cluster Disk 3314428452.]".

[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y

This example removes the disk from the cluster.

 

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

C:\PS>$l = Get-EmcLun testlun

C:\PS>Set-EmcLunAccess -Lun $lun -ClusterSystem $cluster -Available

C:\PS>$disk = Find-EmcHostDisk -Lun $lun -ClusterSystem $cluster

C:\PS>Initialize-EmcHostDisk -HostDisk $disk -Cluster System $cluster

C:\PS>New-EmcVolume -ClusterSystem $cluster -HostDisk $disk -Label “New Volume”

C:\PS>Add-EmcHostDiskToCluster -HostDisk $disk -ClusterSystem $c -ClusterGroupName “Available Storage”

C:\PS>$lid = Get-EmcHostLunIdentifier -Lun $l

C:\PS>Remove-EmcHostDiskFromCluster -HostLunIdentifier $lid -ClusterSystem $c -Force

 

Or

 

C:\PS>Remove-EmcHostDiskFromCluster -HostDisk $disk -ClusterSystem $c -Force

This example removes the disk from the cluster by using the LUN.