你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Start-AzureStorSimpleDeviceFailoverJob

启动卷容器组的故障转移操作。

注意

本文档中引用的 cmdlet 用于管理使用 Azure Service Manager (ASM) API 的旧 Azure 资源。 创建新的资源时,不建议使用此旧版 PowerShell 模块,因为 ASM 计划停用。 有关详细信息,请参阅 Azure Service Manager 停用

Az PowerShell 模块是推荐的 PowerShell 模块,用于使用 PowerShell 管理 Azure 资源管理器 (ARM) 资源。

语法

Start-AzureStorSimpleDeviceFailoverJob
     -VolumecontainerGroups <System.Collections.Generic.List`1[Microsoft.WindowsAzure.Management.StorSimple.Models.DataContainerGroup]>
     [-Force]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureStorSimpleDeviceFailoverJob
     -DeviceId <String>
     -VolumecontainerGroups <System.Collections.Generic.List`1[Microsoft.WindowsAzure.Management.StorSimple.Models.DataContainerGroup]>
     -TargetDeviceId <String>
     [-Force]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureStorSimpleDeviceFailoverJob
     -DeviceName <String>
     -VolumecontainerGroups <System.Collections.Generic.List`1[Microsoft.WindowsAzure.Management.StorSimple.Models.DataContainerGroup]>
     -TargetDeviceName <String>
     [-Force]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]

说明

Start-AzureStorSimpleDeviceFailoverJob cmdlet 启动一个或多个卷容器组从一台设备到另一个设备的故障转移操作。

示例

示例 1:为命名设备和命名目标设备启动故障转移作业

PS C:\>(Get-AzureStorSimpleFailoverVolumeContainers -DeviceName "ChewD_App7") | Where-Object {$_.IsDCGroupEligibleForDR -eq $True} | Start-AzureStorSimpleDeviceFailoverJob -DeviceName "ChewD_App7" -TargetDeviceName "Fuller05" -Force
a3d902be-8ffb-42a4-bbf8-0a1b30db71b2_0ee59ae9-0293-46e2-ae56-bc308c8e5520

此命令使用 Get-AzureStorSimpleFailoverVolumeContainers cmdlet 获取名为 ChewD_App7 的设备故障转移卷容器。 该命令将结果 传递给 Where-Object cmdlet,这会删除具有 IsDCGroupEligibleForDR 属性$True以外的值的容器。 要了解详情,请键入 Get-Help Where-Object。 当前 cmdlet 为剩余的故障转移卷容器启动故障转移作业。 该命令指定设备名称和目标设备名称。 该命令返回 cmdlet 启动的作业的实例 ID。

示例 2:为 ID 指定的设备和目标设备启动故障转移作业

PS C:\>(Get-AzureStorSimpleFailoverVolumeContainers -DeviceId "3825f272-1efb-4c14-b63f-22605ce3b925") | Where-Object {$_.IsDCGroupEligibleForDR -eq $True} | Select-Object -First 1 | Start-AzureStorSimpleDeviceFailoverJob -DeviceId "3825f272-1efb-4c14-b63f-22605ce3b925" -TargetDeviceId "0ee59ae9-0293-46e2-ae56-bc308c8e5520" -Force
4c5ac0d0-4b66-465c-98f5-aec90505ad12_0ee59ae9-0293-46e2-ae56-bc308c8e5520

此命令使用 Get-AzureStorSimpleFailoverVolumeContainers 获取名为 ChewD_App7 的设备故障转移卷容器。 该命令将结果传递到 Where-Object,这会删除除 IsDCGroupEligibleForDR 属性$True以外的值的包含者。 该 cmdlet 将结果 传递给 Select-Object cmdlet,该 cmdlet 选择要传递到当前 cmdlet 的第一个对象。 要了解详情,请键入 Get-Help Select-Object。 当前 cmdlet 将启动所选故障转移卷容器的故障转移作业。 该命令指定设备 ID 和目标设备 ID。 该命令返回 cmdlet 启动的作业的实例 ID。

参数

-DeviceId

指定卷容器组所在的 StorSimple 设备的实例 ID。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-DeviceName

指定卷容器组所在的 StorSimple 设备的名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-Force

强制运行命令而不要求用户确认。

类型:SwitchParameter
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-Profile

指定 Azure 配置文件。

类型:AzureSMProfile
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-TargetDeviceId

指定此 cmdlet 将卷容器组故障转移到的 StorSimple 设备的实例 ID。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-TargetDeviceName

指定此 cmdlet 将卷容器组故障转移到的 StorSimple 设备的名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-VolumecontainerGroups

指定此 cmdlet 故障转移到另一台设备的卷容器组的列表。

类型:List<T>[DataContainerGroup]
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:False

输入

List\<DataContainerGroup\>

可以通过管道将卷容器组的列表传递给此 cmdlet。

输出

String