NAME
Purge-DcsPoolMember
SYNOPSIS
Purges a failed physical disk from a pool in order to make an offline or unavailable pool healthy again.
SYNTAX
Purge-DcsPoolMember -Disk <Object> [ -AllowDataLoss] [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Purges a failed physical disk from a pool in order to make an offline or unavailable pool healthy again. Note: Before running this cmdlet, ensure the required actions have been taken to prepare affected virtual disks. See Get-DcsPurgePrerequisites to obtain the required actions before purging a failed pool disk.
PARAMETERS
- -Disk<Object>
- PhysicalDiskData object, name, or ID that identifies a physical disk. To resolve by name, the name must be unique to the server group.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: true (ByValue)
- Accept wildcard characters: false
-
- -AllowDataLoss<SwitchParameter>
- The purge operation cannot prevent data loss on affected single or dual virtual disks. To allow the purge operation when single or dual virtual disks are affected by a failed disk, this switch parameter is required. Using this switch parameter signifies that you are aware that there will be data loss when the failed disk is purged.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Connection<String>
- Alias of the connection to the server group. If not specified, the default connection is used.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PipelineVariable<String>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
INPUTS
PhysicalDiskData : Object the identifies and describes the physical disk.
OUTPUTS
PoolMemberData : Object the identifies and describes the pool Member.
NOTES
Also see Get--DcsPurgePrerequisites, Get-DcsPhysicalDisk.
EXAMPLES
Purge-DcsPoolMember -Disk "Disk1"
The cmdlet Purge-DcsPoolMember is invoked with the name of the failed disk "Disk1". In this case, all affected virtual disks are mirrored on another server in the server group, so that the switch parameter AllowDataLoss is not necessary. The PoolMemberData object is returned for the purged physical disk. The failed disk is removed and the pool is healthy again.
DiskPoolId | : | 1B3541A1-752C-485E-B729-CB47CE559886:{503aa12d-2e19-11e4-9319-00155d651603} |
DiskInRecoveryId | : | |
DiskTier | : | 2 |
MemberState | : | Unknown |
Size | : | 0 B |
IsMirrored | : | False |
Sequencenumber | : | 31483 |
Id | : | da528352-c3ce-4026-a7fc-f4d2f422e32e |
Caption | : | |
ExtendedCaption | : | Pool disk on SSV1 |
Internal | : | False |
$FailedDisks = Get-DcsPhysicalDisk -Type PoolDisk | Get-DcsMonitor | Where-Object -Filterscript {$_.State -eq "Critical"} $FailedDisks.MonitoredObjectId | Get-DcsPurgePrerequisites $FailedDisks.MonitoredObjectId | Purge-DcsPoolMember -AllowDataLoss
This example shows one way of obtaining the ID of a failed pool disk and using it to get the prerequisites and also to purge the disk. The cmdlet Get-DcsPhysicalDisk is invoked to get the PhysicalDiskData objects for all pool disks. The PhysicalDiskData objects are piped to the cmdlet Get-DcsMonitor where they are filtered by the State "Critical" (the state of a failed disk) and saved in the variable $FailedDisks. The MonitoredObjectId field in the saved objects stored in $FailedDisks is piped to the cmdlet Get-DcsPurgePrerequisites to get the prerequisite actions for the virtual disks affected by the failed disks. In this case, there is one failed disk. Assume the prerequisite actions have been performed and the disk is ready to be purged. The MonitoredObjectId field (containing the Id of the failed disk) in $FailedDisks is piped to the cmdlet Purge-DcsPoolMember to purge the disk from the pool. In this case, a single virtual disk is affected by the failed disk, so the parameter AllowDataLoss must be included in order to allow the operation. The PoolMemberData object is returned for the purged physical disk. The failed disk is removed and the pool is healthy again.
DiskPoolId | : | 1B3541A1-752C-485E-B729-CB47CE559886:{503aa12d-2e19-11e4-9319-00155d651603} |
DiskInRecoveryId | : | |
DiskTier | : | 2 |
MemberState | : | Unknown |
Size | : | 0 B |
IsMirrored | : | False |
Sequencenumber | : | 29948 |
Id | : | 55afb7ea-8a50-4f38-97e0-dd3da8af71b1 |
Caption | : | |
ExtendedCaption | : | Pool disk on SSV1 |
Internal | : | False |