NAME
Move-DcsLogicalDisk
SYNOPSIS
Moves a logical disk (storage source) used in a mirrored or dual virtual disk.
SYNTAX
Move-DcsLogicalDisk -VirtualDisk <Object> -Pool <Object> [ -Server <Object> ] [ -Yes] [ -Connection <String> ] [ -PipelineVariable <String> ] [ -WhatIf] [ -Confirm]
Move-DcsLogicalDisk -VirtualDisk <Object> -SourceServer <Object> -DestinationServer <Object> [ -Yes] [ -Connection <String> ] [ -PipelineVariable <String> ] [ -WhatIf] [ -Confirm]
Move-DcsLogicalDisk -LogicalDisk <Object> -Pool <Object> [ -Yes] [ -Connection <String> ] [ -PipelineVariable <String> ] [ -WhatIf] [ -Confirm]
Move-DcsLogicalDisk -LogicalDisk <Object> -DestinationServer <Object> [ -Yes] [ -Connection <String> ] [ -PipelineVariable <String> ] [ -WhatIf] [ -Confirm]
DESCRIPTION
Moves a logical disk (storage source) used in a mirrored or dual virtual disk. The logical disk in a mirrored virtual disk can be moved to another disk pool on the same server. The logical disk in a dual virtual disk can be moved to another server that shares the pool. Paths are adjusted to use the new source. The move is done with a minimal loss of high availability.
PARAMETERS
- -VirtualDisk<Object>
- VirtualDiskData object, name or ID that identifies the virtual disk with the storage source to move. (The VirtualDiskData object can be obtained from Get-DcsVirtualDisk.)
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: true (ByValue)
- Accept wildcard characters: false
-
- -Pool<Object>
- DiskPoolData object, name or ID that identifies the disk pool to use to create the new storage source. To resolve by name, the name must be unique to the server group or the server must be specified. (The DiskPoolData object can be obtained from Get-DcsPool.)
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Server<Object>
- ServerHostData object, name or ID that identifies the server that owns the logical disk to be moved. The computer name must be unique or the name must be fully qualified. (The ServerHostData object can be obtained from Get-DcsServer.)
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Yes<SwitchParameter>
- Moving a logical disk is an operation that requires confirmation. Specify this parameter to confirm your intention in order to prevent user interaction during scripted scenarios. If this parameter is not specified, user interaction will be required.
-
- 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
-
- -WhatIf<SwitchParameter>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Confirm<SwitchParameter>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -SourceServer<Object>
- ServerHostData object, name or ID that identifies the server that owns the current logical disk to be moved in a shared pool. Use this parameter when moving the storage source from one server to another server that share the same disk pool. The computer name must be unique or the name must be fully qualified. (The ServerHostData object can be obtained from Get-DcsServer.)
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -DestinationServer<Object>
- ServerHostData object, name or ID that identifies the new server where the storage source is to be moved within a shared pool. Use this parameter when moving the storage source from one server to another server that share the same disk pool. The computer name must be unique or the name must be fully qualified. (The ServerHostData object can be obtained from Get-DcsServer.)
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -LogicalDisk<Object>
- LogicalDiskData object, ID or caption of a logical disk that identifies the storage source to move.
-
- 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
Only logical disks that are eligible to be moved will be moved. Warnings will be provided for logical disks that cannot be moved. Also see Stop-DcsMoveStorageSource, Get-DcsVirtualDisk, Replace-DcsVirtualDiskSource
EXAMPLES
$SSV1_VDs = Get-DcsVirtualDisk -Server "SSV1" $SSV1_VDs | ForEach { Move-DcsLogicalDisk -Server "SSV1" -VirtualDisk $_.Id -Pool "Disk pool 4" }
The cmdlet Get-DcsVirtualDisk is used to get all VirtualDiskData objects on the server "SSV1". The objects are stored in the variable $SSV_VDs. That variable is piped to the cmdlet Move-DcsLogicalDisk and the ID in the object is used to identify each virtual disk. The ForEach loop is used to perform the operation for each object in $SSV_VDs. The pool to use as the new storage source is "Disk pool 4" on the server "SSV1". Two virtual disks are not eligible to be moved and warnings are provided for those. Two virtual disks were moved and the VirtualDiskData objects are returned for those.
Move-DcsLogicalDisk | : | Non-mirrored virtual disk sources cannot be replaced. |
At line | : | 1 char:42 |
+ CategoryInfo | : | NotSpecified: (:) [Move-DcsLogicalDisk], FaultException`1 |
+ FullyQualifiedErrorId | : | 32,DataCore.Executive.PowerShell.MoveLogicalDiskCmdlet |
Move-DcsLogicalDisk | : | Unable to use Disk pool 4 on SSV1 for the dual virtual disk. |
At line | : | 1 char:42 |
+ CategoryInfo | : | NotSpecified: (:) [Move-DcsLogicalDisk], FaultException`1 |
+ FullyQualifiedErrorId | : | 32,DataCore.Executive.PowerShell.MoveLogicalDiskCmdlet |
VirtualDiskGroupId | : | |
FirstHostId | : | 3E3C4C19-BC7D-48AE-81A1-3121C0591962 |
SecondHostId | : | 1EC3121D-3169-4E41-A6B0-E6E97F4D7DFD |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
SnapshotPoolId | : | |
Alias | : | Virtual disk 7 |
Description | : | |
Size | : | 25 GiB |
Type | : | MultiPathMirrored |
DiskStatus | : | Online |
InquiryData | : | DataCore Virtual Disk DCS c4866c71ed544e4ea48b9a35bc1769d1 |
ScsiDeviceId | : | {96, 3, 13, 144...} |
ScsiDeviceIdString | : | 60030D90926D4F07EC9CBE96B6623483 |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
Disabled | : | False |
ManualRecovery | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Sequencenumber | : | 11302 |
Id | : | c4866c71ed544e4ea48b9a35bc1769d1 |
Caption | : | Virtual disk 7 |
ExtendedCaption | : | Virtual disk 7 from Server Group |
Internal | : | False |
VirtualDiskGroupId | : | |
FirstHostId | : | 3E3C4C19-BC7D-48AE-81A1-3121C0591962 |
SecondHostId | : | 4B1BC95E-D3DA-469A-B397-6A2720B4FB1B |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
SnapshotPoolId | : | |
Alias | : | Virtual disk 8 |
Description | : | |
Size | : | 30 GiB |
Type | : | MultiPathMirrored |
DiskStatus | : | Online |
InquiryData | : | DataCore Virtual Disk DCS 42126c8857974c0abef93ca2d0b80a1e |
ScsiDeviceId | : | {96, 3, 13, 144...} |
ScsiDeviceIdString | : | 60030D90A6755007E2C485A12ED6EB6C |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
Disabled | : | False |
ManualRecovery | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Sequencenumber | : | 12120 |
Id | : | 42126c8857974c0abef93ca2d0b80a1e |
Caption | : | Virtual disk 8 |
ExtendedCaption | : | Virtual disk 8 from Server Group |
Internal | : | False |
Move-DcsLogicalDisk -VirtualDisk "Virtual disk 5" -SourceServer "SSV1" -DestinationServer "SSV3" -Yes
The logical disk for the dual virtual disk named "Virtual disk 5" on the server "SSV1" is moved to the server "SSV3" within the same shared pool. The parameter Yes for confirmation is included so that user intervention is not required.
VirtualDiskGroupId | : | |
FirstHostId | : | 4B1BC95E-D3DA-469A-B397-6A2720B4FB1B |
SecondHostId | : | 1EC3121D-3169-4E41-A6B0-E6E97F4D7DFD |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
SnapshotPoolId | : | |
Alias | : | Virtual disk 5 |
Description | : | |
Size | : | 15 GiB |
Type | : | Dual |
DiskStatus | : | FailedRedundancy |
InquiryData | : | DataCore Virtual Disk DCS 46546606f92a45488fbe3aa958172b36 |
ScsiDeviceId | : | {96, 3, 13, 144...} |
ScsiDeviceIdString | : | 60030D90F0954D072F366E331019F829 |
RemovableMedia | : | False |
WriteThrough | : | True |
Offline | : | False |
Disabled | : | False |
ManualRecovery | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Sequencenumber | : | 13805 |
Id | : | 46546606f92a45488fbe3aa958172b36 |
Caption | : | Virtual disk 5 |
ExtendedCaption | : | Virtual disk 5 from Server Group |
Internal | : | False |
$LD = Get-DcsLogicalDisk -Server "SSV1" -Pool "Disk pool 4" ForEach ($l in $LD) {Move-DcsLogicalDisk -LogicalDisk $l.Id -Pool "Disk pool 1"}
The cmdlet Get-DcsLogicalDisk is used to get all LogicalDiskData objects from "Disk pool 4" on the server "SSV1". The objects are stored in the variable $LD. The objects in the variable are used with the cmdlet Move-DcsLogicalDisk and the ID in the LogicalDiskData object is used to identify each logical disk. The ForEach loop is used to perform the operation for each object in $LD. The logical disks are moved to the pool "Disk pool 1" on the same server "SSV1".
VirtualDiskGroupId | : | |
FirstHostId | : | 3E3C4C19-BC7D-48AE-81A1-3121C0591962 |
SecondHostId | : | 4B1BC95E-D3DA-469A-B397-6A2720B4FB1B |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
SnapshotPoolId | : | |
Alias | : | Virtual disk 8 |
Description | : | |
Size | : | 30 GiB |
Type | : | MultiPathMirrored |
DiskStatus | : | Online |
InquiryData | : | DataCore Virtual Disk DCS 42126c8857974c0abef93ca2d0b80a1e |
ScsiDeviceId | : | {96, 3, 13, 144...} |
ScsiDeviceIdString | : | 60030D90A6755007E2C485A12ED6EB6C |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
Disabled | : | False |
ManualRecovery | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Sequencenumber | : | 14542 |
Id | : | 42126c8857974c0abef93ca2d0b80a1e |
Caption | : | Virtual disk 8 |
ExtendedCaption | : | Virtual disk 8 from Server Group |
Internal | : | False |
VirtualDiskGroupId | : | |
FirstHostId | : | 3E3C4C19-BC7D-48AE-81A1-3121C0591962 |
SecondHostId | : | 1EC3121D-3169-4E41-A6B0-E6E97F4D7DFD |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
SnapshotPoolId | : | |
Alias | : | Virtual disk 7 |
Description | : | |
Size | : | 25 GiB |
Type | : | MultiPathMirrored |
DiskStatus | : | Online |
InquiryData | : | DataCore Virtual Disk DCS c4866c71ed544e4ea48b9a35bc1769d1 |
ScsiDeviceId | : | {96, 3, 13, 144...} |
ScsiDeviceIdString | : | 60030D90926D4F07EC9CBE96B6623483 |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
Disabled | : | False |
ManualRecovery | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Sequencenumber | : | 16141 |
Id | : | c4866c71ed544e4ea48b9a35bc1769d1 |
Caption | : | Virtual disk 7 |
ExtendedCaption | : | Virtual disk 7 from Server Group |
Internal | : | False |
$LD = Get-DcsLogicalDisk -Server "SSV1" -Pool "Shared pool 1" ForEach ($l in $LD) {Move-DcsLogicalDisk -LogicalDisk $l.Id -DestinationServer "SSV2"}
The cmdlet Get-DcsLogicalDisk is used to get all LogicalDiskData objects from the shared pool "Shared pool 1" on the server "SSV1". The objects are stored in the variable $LD. The objects in the variable are used with the cmdlet Move-DcsLogicalDisk and the ID in the LogicalDiskData object is used to identify each logical disk. The ForEach loop is used to perform the operation for each object in $LD. In this case, there was one logical disk that was not eligible to be moved and a warning is provided. One logical disk was moved to the server "SSV2" on the same shared pool and the VirtualDiskData object is returned.
Move-DcsLogicalDisk | : | Non-mirrored virtual disk sources cannot be replaced. |
At line | : | 1 char:41 |
+ CategoryInfo | : | NotSpecified: (:) [Move-DcsLogicalDisk], FaultException`1 |
+ FullyQualifiedErrorId | : | 32,DataCore.Executive.PowerShell.MoveLogicalDiskCmdlet |
VirtualDiskGroupId | : | |
FirstHostId | : | 1EC3121D-3169-4E41-A6B0-E6E97F4D7DFD |
SecondHostId | : | 4B1BC95E-D3DA-469A-B397-6A2720B4FB1B |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
SnapshotPoolId | : | |
Alias | : | Virtual disk 6 |
Description | : | |
Size | : | 20 GiB |
Type | : | Dual |
DiskStatus | : | FailedRedundancy |
InquiryData | : | DataCore Virtual Disk DCS 049db1f47ad14c179e3c969052a45371 |
ScsiDeviceId | : | {96, 3, 13, 144...} |
ScsiDeviceIdString | : | 60030D90481C4E0775F6DBA00A745C04 |
RemovableMedia | : | False |
WriteThrough | : | True |
Offline | : | False |
Disabled | : | False |
ManualRecovery | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Sequencenumber | : | 17624 |
Id | : | 049db1f47ad14c179e3c969052a45371 |
Caption | : | Virtual disk 6 |
ExtendedCaption | : | Virtual disk 6 from Server Group |
Internal | : | False |