NAME

Get-DcsPurgePrerequisites

SYNOPSIS

Returns prerequisite actions needed to be performed before purging a failed pool disk.

SYNTAX

Get-DcsPurgePrerequisites   -Disk <Object>   [ -Connection <String> ]   [ -PipelineVariable <String> ]

DESCRIPTION

Returns prerequisite actions needed to be performed before purging a failed pool disk. After completing prerequisite actions, see Purge-DcsPoolMember to begin the purge operation for the 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

-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 identifying and describing a physical disk.

OUTPUTS

VirtualDiskChunkStatistics : Object containing virtual disk information on the physical disk, such as ID, allocated size on the disk and total allocated size, along with actions that need to be taken for each virtual disk.

NOTES

Also see Purge-DcsPoolMember, Get-DcsPhysicalDisk.

EXAMPLES


-------------- Example 1 Gets purge prerequisites for a disk specified by name --------------
Get-DcsPurgePrerequisites -Disk "Disk2"
			

The prerequisite actions needed to purge the disk named "Disk2" from the configuration are retrieved. The VirtualDiskChunkStatistics object is returned, which includes information for the virtual disks that will be affected by the purge operation: the virtual disk ID, size of the allocation on the failed disk, total allocation size of the virtual disk, and the actions required so that the purge operation can be performed. After all actions have been performed, the cmdlet Purge-DcsPoolMember can be run to perform the purge operation.

Id                                                      AllocatedSizeOnDisk                   AllocatedSizeTotal                              Actions
--                                                      -------------------                   ------------------                              -------
af4a7c67d3484b02858d0849451e5ee5                                 6979321856                          13287555072                                 None
97cdc9be7747421da532c1f9a0c9c43e                                 4563402752                           9529458688 ...eleteSnapshots, SplitFailedMirror
001e75810bf24809bf98e1a7a416afee                                 7113539584                          11542724608                     SplitReplication
344410225d844622afd82e1f9d9023f4                                  268435456                            268435456          SplitMirrorAndDeleteCdpDisk
88d953cd90654f93a57c543ef2b00e56                                 4563402752                          10468982784                                 None
		

-------------- Example 2 Gets purge prerequisites for a failed pool disk by ID --------------
$FailedDisks = Get-DcsPhysicalDisk -Type PoolDisk | Get-DcsMonitor | Where-Object -Filterscript {$_.State -eq "Critical"}
$FailedDisks.MonitoredObjectId | Get-DcsPurgePrerequisites

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.

Id                                                      AllocatedSizeOnDisk                   AllocatedSizeTotal                              Actions
--                                                      -------------------                   ------------------                              -------
af4a7c67d3484b02858d0849451e5ee5                                 6979321856                          13287555072                                 None
97cdc9be7747421da532c1f9a0c9c43e                                 4563402752                           9529458688 ...eleteSnapshots, SplitFailedMirror
001e75810bf24809bf98e1a7a416afee                                 7113539584                          11542724608                     SplitReplication
344410225d844622afd82e1f9d9023f4                                  268435456                            268435456          SplitMirrorAndDeleteCdpDisk
88d953cd90654f93a57c543ef2b00e56                                 4563402752                          10468982784                                 None