NAME
Repair-DcsVirtualDisk
SYNOPSIS
Replaces one failed storage source (logical disk) in a mirrored virtual disk with another storage source from a healthy disk pool.
SYNTAX
Repair-DcsVirtualDisk -TriggerState <Object> -DiskPools <String[]> [ -LocalServerOnly] [ -ForceSplit] [ -Connection <String> ] [ -PipelineVariable <String> ]
Repair-DcsVirtualDisk -VirtualDisk <Object> -DiskPools <String[]> [ -LocalServerOnly] [ -ForceSplit] [ -Connection <String> ] [ -PipelineVariable <String> ]
Repair-DcsVirtualDisk -LogicalDisk <Object> -DiskPools <String[]> [ -LocalServerOnly] [ -ForceSplit] [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Replaces one failed storage source (logical disk) in a virtual disk with another storage source from a healthy disk pool. The logical disk to replace can be identified by virtual disk or logical disk if run from the cmdlet. If the virtual disk is healthy and does not require fixing, an informational message to that effect will be logged and the repair will not take place. If the virtual disk is failed but cannot be repaired (for instance, in double failure), an alert will be posted with an explanation.
PARAMETERS
- -TriggerState<Object>
- The TriggerState will be appended to the script when a task trigger fires and a PowerShell script action is configured with the AppendTriggerStates parameterPowerShell script action in the task. (See Add-DcsAction for more information.) THIS PARAMETER IS ONLY VALID WHEN RUNNING A SCRIPT ACTION IN A TASK. THE ONLY WAY TO USE THE TRIGGER STATE IS FROM THE TASK. It cannot be used by invoking this cmdlet.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -DiskPools<String[]>
- A comma separated list of pool candidates to use as the new logical disk for a failed virtual disk. The pool will be automatically selected from the list. Eligible candidates will be online and healthy, and cannot exist on the same server as the healthy storage source side of the mirror. The list can include pools from different servers, but a pool on the same server as the failed storage source will be preferred in order to maintain the same front-end paths and avoid a rescan on the host. The first eligible pool in the list of pool candidates will be used. All pool names should be unique to the server group. For example, if the list consisted of "Disk pool 1", "Disk pool 2", "Disk pool 3" and all three pools are eligible candidates and "Disk pool 1" resides on the same server as the failed storage source, "Disk pool 1" will be selected. NOTE: To include shared disk pools in the list, use the extended caption for the pool in order to identify which server to use to create the logical disk and corresponding paths. For instance "SharedPool1 on Server1".
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -LocalServerOnly<SwitchParameter>
- A switch parameter that indicates to only use disk pools from the same server that has the failed storage source. This will prevent the host paths from being replaced which would force the client (host) to perform a disk rescan to see the new paths. This cmdlet will always prefer to repair a virtual disk using local resources, but without this parameter, the cmdlet will split and remirror a virtual disk to repair it if local resources are not available.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -ForceSplit<SwitchParameter>
-
- 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 will be 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
-
- -VirtualDisk<Object>
- The VirtualDiskData object, ID, or name that identifies a virtual disk. To get the virtual disk object or ID, see Get-DcsVirtualDisk.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: true (ByValue)
- Accept wildcard characters: false
-
- -LogicalDisk<Object>
- The LogicalDiskData object, ID, or name that identifies a logical disk. To get the logical disk object or ID, see Get-DcsLogicalDisk.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
INPUTS
VirtualDiskData : Object that identifies and describes the virtual disk.
OUTPUTS
VirtualDiskData : Object that identifies and describes the virtual disk.
NOTES
Also see Replace-DcsVirtualDisk, Move-DcsVirtualDiskSource, Get-DcsVirtualDisk, Get-DcsLogicalDisk
EXAMPLES
Get-DcsVirtualDisk -ServerGroup Group1 | Repair-DcsVirtualDisk -DiskPools "Disk pool 1", "Disk pool 2", "Disk pool 3", "Disk pool 4", "Disk pool 5" -LocalServerOnly
The cmdlet Get-DcsVirtualDisk is invoked to get the VirtualDiskData objects for all virtual disks in the server group. The results are piped to the cmdlet Repair-DcsVirtualDisk. Each eligible failed mirrored virtual disk is repaired using an eligible disk pool from the list provided for the parameter DiskPools. The switch parameter is included to ensure that a pool from the same server as the failed logical disk is used.
VirtualDiskGroupId | : | |
FirstHostId | : | E9D5564F-D72A-4C5C-AA0F-B2C23A3AD093 |
SecondHostId | : | BBA07A42-44F1-40A6-A0E0-756351FFE386 |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
SnapshotPoolId | : | |
Alias | : | Virtual disk 2 |
Description | : | |
Size | : | 10.00 GiB |
Type | : | MultiPathMirrored |
DiskStatus | : | FailedRedundancy |
InquiryData | : | DataCore Virtual Disk DCS a55059113f1e424895f4eea7751aa546 |
ScsiDeviceId | : | {96, 3, 13, 144...} |
ScsiDeviceIdString | : | 60030D906348F000688BBA02259ABAE1 |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
Disabled | : | False |
ManualRecovery | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Sequencenumber | : | 29893 |
Id | : | a55059113f1e424895f4eea7751aa546 |
Caption | : | Virtual disk 2 |
ExtendedCaption | : | Virtual disk 2 from Group1 |
Internal | : | False |
VirtualDiskGroupId | : | |
FirstHostId | : | E9D5564F-D72A-4C5C-AA0F-B2C23A3AD093 |
SecondHostId | : | BBA07A42-44F1-40A6-A0E0-756351FFE386 |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
SnapshotPoolId | : | |
Alias | : | Virtual disk 5 |
Description | : | |
Size | : | 10.00 GiB |
Type | : | MultiPathMirrored |
DiskStatus | : | FailedRedundancy |
InquiryData | : | DataCore Virtual Disk DCS 8dd498e35f3b44a6ad612d0ee29d3ce4 |
ScsiDeviceId | : | {96, 3, 13, 144...} |
ScsiDeviceIdString | : | 60030D90D34EF00046FEB7263A4420AA |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
Disabled | : | False |
ManualRecovery | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Sequencenumber | : | 29942 |
Id | : | 8dd498e35f3b44a6ad612d0ee29d3ce4 |
Caption | : | Virtual disk 5 |
ExtendedCaption | : | Virtual disk 5 from Group1 |
Internal | : | False |
$LD = Get-DcsLogicalDisk -VirtualDisk "Virtual disk 3" -Server SSV1 Repair-DcsVirtualDisk -LogicalDisk $LD -DiskPools SSV3Pool1
The cmdlet Get-DcsLogicalDisk is invoked to get the LogicalDiskData object for the storage source of "Virtual disk 3" on the server named "SSV1". ("Virtual disk 3" was created from a pool on server "SSV1" and "SSV2".) That object is stored in the variable $LD. The cmdlet Repair-DcsVirtualDisk is invoked to replace the storage source on SSV1 (stored in the variable $LD) with a storage source created from "SSV3Pool1" which is on the server "SSV3". After the repair, "Virtual disk 3" consists of mirrors from "SSV2" and "SSV3".
VirtualDiskGroupId | : | |
FirstHostId | : | BBA07A42-44F1-40A6-A0E0-756351FFE386 |
SecondHostId | : | 5F19A038-D494-43E4-B657-51213CE189D0 |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
SnapshotPoolId | : | |
Alias | : | Virtual disk 3 |
Description | : | |
Size | : | 15.00 GiB |
Type | : | MultiPathMirrored |
DiskStatus | : | FailedRedundancy |
InquiryData | : | DataCore Virtual Disk DCS 2ba9e02a7c114153abbdcbfb5eb6d0a3 |
ScsiDeviceId | : | {96, 3, 13, 144...} |
ScsiDeviceIdString | : | 60030D908ABBCC00C10B69AA1E9A5AF7 |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
Disabled | : | False |
ManualRecovery | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Sequencenumber | : | 22795 |
Id | : | 2ba9e02a7c114153abbdcbfb5eb6d0a3 |
Caption | : | Virtual disk 3 |
ExtendedCaption | : | Virtual disk 3 from Group1 |
Internal | : | False |