VPLEX:如何拆卸和重新连接mirror(leg)
原文链接:VPLEX:如何拆卸和重新安装镜子(支腿) |Dell 中国
说明
在分离或连接镜像之前,请确保确定正确的支路和群集名称。
Before detaching or attaching a mirror, ensure you identify the correct leg and cluster name.
在阵列上运行数组重新发现,以确保我们看到数组的最新状态
Run an array rediscover on the array to ensure that we are seeing the latest status of the array.
VPlexcli:/> cd /clusters/cluster-1/storage-elements/storage-arrays/EMC-CLARiiON-APM00111501539/
VPlexcli:/clusters/cluster-1/storage-elements/storage-arrays/EMC-CLARiiON-APM00111501539/> array re-discover
运行 show-use-hierarchy 以确定虚拟卷是否在一致性组中,是否必须将其删除。(不能对一致性组中的虚拟卷进行任何更改)
Run show-use-hierarchy to determine if the virtual-volume is within a consistency-group and must be removed. (No changes can be made on a virtual-volume within a consistency-group)
以下示例表明虚拟卷是一致性组 (TEST01) 的一部分,必须先删除,然后才能分离坏镜像段:
Example below indicates that the virtual-volume is part of consistency-group (TEST01) and must be removed first before we can detach the bad mirror leg:
VPlexcli:/> show-use-hierarchy /clusters/cluster-1/virtual-volumes/test_DR1_vol_volconsistency-group: TEST01 (synchronous)
virtual-volume: test_DR1_vol_vol (1G, major-failure, distributed @ cluster-1, unexported)
distributed-device: test_DR1_vol (1G, raid-1, major-failure)
distributed-device-component: local_device_C1_DR1_leg (1G, raid-0, cluster-1)
extent: extent_C1_DR1_leg_1 (1G)
storage-volume: C1_DR1_leg (1G)
logical-unit: VPD83T3:60060160c9c02c00a49a72452eaae811
storage-array: EMC-CLARiiON-APM00111501539
distributed-device-component: local_device_C2_DR1_leg (1G, raid-0, critical-failure, cluster-2)
extent: extent_C2_DR1_leg_1 (1G, critical-failure)
storage-volume: C2_DR1_leg (1G, critical-failure)
logical-unit: VPD83T3:60060160c9c02c00c6243381ffa5e811
storage-array: EMC-CLARiiON-APM00111501539
使用以下命令从一致性组中删除虚拟卷。
Remove the virtual-volume from the consistency group using the below command.
VPlexcli:/> consistency-group remove-virtual-volumes --consistency-group TEST01 --virtual-volumes test_DR1_vol_vol
Note:
在使用启用了 RecoverPoint 的一致性组时,如果由于虚拟卷位于受 RecoverPoint 保护的一致性组中而无法从一致性组中删除,则必须首先从 RecoverPoint 一致性组中删除该卷,然后删除/销毁任何与该 RecoverPoint 一致性组相关的 R 集,这必须在 RecoverPoint 端完成。从 RecoverPoint 一致性组中删除该卷并且不再与任何 R-Set 关联后,您可以继续从 VPLEX 一致性组中删除该虚拟卷。
When using RecoverPoint enabled consistency-groups, if virtual-volume cannot be removed from consistency-group due to being in a consistency-group protected by RecoverPoint, you must first remove the volume from the RecoverPoint consistency-group within and also remove/destroy any R-sets that are involved with that RecoverPoint consistency-group and this must be done on the RecoverPoint side. After the volume has been removed from the RecoverPoint consistency-group and is no longer associated with any R-Sets, you can continue to remove the virtual-volume from the VPLEX consistency-group.重新运行 show-use-hierarchy 以确认卷不再位于一致性组中,以便我们可以继续操作。
Rerun show-use-hierarchy to confirm that the volume is no longer in a consistency-group so that we can proceed further.
以下示例表明虚拟卷不再是一致性组 (TEST01) 的一部分:
Example below indicates that the virtual-volume is no longer part of the consistency-group (TEST01):
VPlexcli:/> show-use-hierarchy /clusters/cluster-1/virtual-volumes/test_DR1_vol_volvirtual-volume: test_DR1_vol_vol (1G, major-failure, distributed @ cluster-1, unexported)
distributed-device: test_DR1_vol (1G, raid-1, major-failure)
distributed-device-component: local_device_C1_DR1_leg (1G, raid-0, cluster-1)
extent: extent_C1_DR1_leg_1 (1G)
storage-volume: C1_DR1_leg (1G)
logical-unit: VPD83T3:60060160c9c02c00a49a72452eaae811
storage-array: EMC-CLARiiON-APM00111501539
distributed-device-component: local_device_C2_DR1_leg (1G, raid-0, critical-failure, cluster-2)
extent: extent_C2_DR1_leg_1 (1G, critical-failure)
storage-volume: C2_DR1_leg (1G, critical-failure)
logical-unit: VPD83T3:60060160c9c02c00c6243381ffa5e811
storage-array: EMC-CLARiiON-APM00111501539
现在,我们可以使用以下命令从分布式设备 (test_DR1_vol) 中删除分布式设备组件/镜像支路 (local_device_C2_DR1_leg)。如果如下所示成功分离镜像,请转到步骤 7。但是,如果由于错误“无法删除镜像,因为这会导致与现有的失败者设置冲突”而导致分离镜像失败,请转到步骤 6。
We can now remove the distributed-device-component/mirror leg (local_device_C2_DR1_leg) from the distributed-device (test_DR1_vol) by using the below command. If detaching mirror was successful like below, go to step 7. However, if detaching the mirror fails due to error "can't remove mirror as this would lead to conflict with existing loser settings," go to step 6.
VPlexcli:/> device detach-mirror --device test_DR1_vol --mirror local_device_C2_DR1_leg --discard --force
Detached mirror local_device_C2_DR1_leg.
Mirror local_device_C2_DR1_leg is below /clusters/cluster-2/devices.
始终使用标志 --device 在分布式设备级别运行设备分离,然后使用标志 --mirror 指定要分离的分布式设备组件。
使用标志 --discard 以防止在我们正在分离的分布式设备组件/镜像之上自动创建虚拟卷。
使用标志 --force 跳过任何提示。
Always run the device detach at distributed-device level using the flag --device and then specify the distributed-device-component to detach using the flag --mirror.
Use the flag --discard in order to prevent a virtual-volume to be automatically created on top of the distributed-device-component/mirror which we are detaching.
Use the flag --force to skip any prompts.
如果由于与现有失败者设置冲突而在尝试分离镜像时收到错误,则必须首先更改分离规则集名称,以将对方集群作为获胜者。如果成功拆卸后视镜支腿,则可以跳过此步骤。
If you have received an error when attempting to detach the mirror due to conflicts with existing loser settings, you must first change the detach rule-set-name to have the opposing cluster as the winner. This step can be skipped if detaching the mirror leg was successful.
显示由于失败者设置冲突而收到的错误示例:
Example showing the error received due to conflicting loser settings:
VPlexcli:/> device detach-mirror --device test_DR1_vol --mirror local_device_C2_DR1_leg --discard --forcedevice detach-mirror: Evaluation of <<device detach-mirror --device test_DR1_vol --mirror local_device_C2_DR1_leg --discard --force>> failed.
cause: Unable to detach 'local_device_C2_DR1_leg' from device 'test_DR1_vol.
cause: Unable to detach mirror 'local_device_C2_DR1_leg' from distributed Device 'test_DR1_vol'.
cause: Can't remove the mirror, as this would lead to a conflict with the existing loser settings.
若要绕过冲突的失败者设置,首先必须将分布式设备规则集设置为将另一条腿作为获胜者。
To bypass the conflicting loser settings, you first must set the distributed-device rule-set to have the opposite leg as winner.
如何检查当前 rule-set-name 属性的示例:
Example on how to check the current rule-set-name attribute:
VPlexcli:/> cd /distributed-storage/distributed-devices/test_DR1_vol/VPlexcli:/distributed-storage/distributed-devices/test_DR1_vol> ll
Attributes:
Name Value
---------------------- ----------------------
application-consistent false
auto-resume true
block-count 262144
block-size 4K
capacity 1G
clusters-involved [cluster-1, cluster-2]
consistency-group -
geometry raid-1
health-indications []
health-state ok
locality distributed
operational-status ok
rebuild-allowed true
rebuild-eta -
rebuild-progress -
rebuild-status done
rebuild-type full
rule-set-name cluster-2-detaches <--
service-status running
storage-array-family clariion
stripe-depth -
system-id test_DR1_vol
thin-capable true
transfer-size 128K
virtual-volume test_DR1_vol_vol
Contexts:
Name Description
----------------------------- ------------------------------------------------
at-cluster Contains cluster-specific information on the
enclosing distributed-device.
distributed-device-components Contains information about one cluster-local leg
of the enclosing distributed-device.
如何将 rule-set-name 属性设置为相反集群的示例:
Example on how to set the rule-set-name attribute to the opposite cluster:
VPlexcli:/distributed-storage/distributed-devices/test_DR1_vol> set rule-set-name cluster-1-detachesVPlexcli:/distributed-storage/distributed-devices/test_DR1_vol> ll
Attributes:
Name Value
---------------------- ----------------------
application-consistent false
auto-resume true
block-count 262144
block-size 4K
capacity 1G
clusters-involved [cluster-1, cluster-2]
consistency-group -
geometry raid-1
health-indications []
health-state ok
locality distributed
operational-status ok
rebuild-allowed true
rebuild-eta -
rebuild-progress -
rebuild-status done
rebuild-type full
rule-set-name cluster-1-detaches <--
service-status running
storage-array-family clariion
stripe-depth -
system-id test_DR1_vol
thin-capable true
transfer-size 128K
virtual-volume test_DR1_vol_vol
Contexts:
Name Description
----------------------------- ------------------------------------------------
at-cluster Contains cluster-specific information on the
enclosing distributed-device.
distributed-device-components Contains information about one cluster-local leg
of the enclosing distributed-device.
现在,您可以分离镜像支路,而不会出现失败者设置冲突的错误。
Now you can detach the mirror leg without the error for conflicting loser settings.
VPlexcli:/> device detach-mirror --device test_DR1_vol --mirror local_device_C2_DR1_leg --discard --forceDetached mirror local_device_C2_DR1_leg.
Mirror local_device_C2_DR1_leg is below /clusters/cluster-2/devices.
重新运行 show-use-hierarchy 以验证是否已成功删除 distributed-device-component/mirror。
Rerun show-use-hierarchy to verify that the distributed-device-component/mirror has been removed successfully.
以下示例表明我们不再看到 distributed-device-component (local_device_C2_DR1_leg) 附加:
Example below indicates that we no longer see distributed-device-component (local_device_C2_DR1_leg) attached any longer:
VPlexcli:/> show-use-hierarchy /clusters/cluster-1/virtual-volumes/test_DR1_vol_volvirtual-volume: test_DR1_vol_vol (1G, distributed @ cluster-1, unexported)
distributed-device: test_DR1_vol (1G, raid-1)
distributed-device-component: local_device_C1_DR1_leg (1G, raid-0, cluster-1)
extent: extent_C1_DR1_leg_1 (1G)
storage-volume: C1_DR1_leg (1G)
logical-unit: VPD83T3:60060160c9c02c00a49a72452eaae811
storage-array: EMC-CLARiiON-APM00111501539
现在,我们可以将之前分离的支路再次重新连接到分布式设备(这将自动触发完全重建)。We can now reattach the previously detached leg again to the distributed-device (this will automatically trigger a full rebuild).
VPlexcli:/> device attach-mirror --device test_DR1_vol --mirror local_device_C2_DR1_leg
有关此步骤的说明:
Note regarding this step:
连接镜像支路会触发完全重建。始终使用标志 --device 在分布式设备级别运行设备附加,然后使用标志 --mirror 指定要附加的分布式设备组件。
Attaching the mirror leg triggers a full rebuild. Always run the device attach at the distributed-device level using the flag --device and then specify the distributed-device-component to attach using the flag --mirror.
重新运行 show-use-hierarchy 以验证分布式设备组件/镜像是否已成功重新连接。
Rerun show-use-hierarchy to verify that the distributed-device-component/mirror has been reattached successfully.
以下示例表明分布式设备组件 (local_device_C2_DR1_leg) 现在已重新连接到分布式设备 (test_DR1_vol)。
Example below indicates that the distributed-device-component (local_device_C2_DR1_leg) is now reattached to the distributed-device (test_DR1_vol).
VPlexcli:/> show-use-hierarchy /clusters/cluster-1/virtual-volumes/test_DR1_vol_volvirtual-volume: test_DR1_vol_vol (1G, minor-failure, distributed @ cluster-1, unexported)
distributed-device: test_DR1_vol (1G, raid-1, minor-failure)
distributed-device-component: local_device_C1_DR1_leg (1G, raid-0, cluster-1)
extent: extent_C1_DR1_leg_1 (1G)
storage-volume: C1_DR1_leg (1G)
logical-unit: VPD83T3:60060160c9c02c00a49a72452eaae811
storage-array: EMC-CLARiiON-APM00111501539
distributed-device-component: local_device_C2_DR1_leg (1G, raid-0, critical-failure, cluster-2)
extent: extent_C2_DR1_leg_1 (1G, critical-failure)严重故障
storage-volume: C2_DR1_leg (1G, critical-failure)
logical-unit: VPD83T3:60060160c9c02c00c6243381ffa5e811storage-array: EMC-CLARiiON-APM00111501539
有关此步骤的说明:
Note regarding this step:
虚拟卷显示轻微故障状态,预计会看到“由于在严重故障段上发生的重建”。重建完成后,状态将更改。
The virtual-volume is showing minor-failure status is expected to be seen due to rebuilds occurring on the critical-failure leg. Once rebuilds have finished, the status changes.检查重建状态。此输出显示重新生成完成的时间长度、完成的百分比和吞吐量值 (M/s)。
Check the rebuild status. The output from this displays the length of time for the rebuild to complete, the percentage finished, and the throughput value (M/s).
VPlexcli:/> rebuild status
[1] storage_volumes marked for rebuild
Global rebuilds:
device rebuild type rebuilder director rebuilt/total percent finished throughput ETA
-------------------- ------------ ------------------ ------------- ---------------- ---------- ----------
C2_DR1_leg full s2_1ce9_spa 0.5G/1G 50.00% 87.5M/s 8.0hr
Local rebuilds:
No active local rebuilds.
将虚拟卷重新添加回原始一致性组,如下所示。
Readd the virtual-volume back to the original consistency-group like below.
VPlexcli:/> consistency-group add-virtual-volumes --consistency-group TEST01 --virtual-volumes test_DR1_vol_vol
重建完成后,最后一次运行 show-use-hierarchy,以确认两个镜像支路再次正常运行。(正常运行的卷不会输出次要故障、重大故障或严重故障。)
Run show-use-hierarchy one last time once rebuilds have finished to confirm that both mirror legs are healthy once again. (Healthy volumes will not output minor-failure, major-failure, or critical-failure.)
VPlexcli:/> show-use-hierarchy /clusters/cluster-1/virtual-volumes/test_DR1_vol_vol
consistency-group: TEST01 (synchronous)
virtual-volume: test_DR1_vol_vol (1G, distributed @ cluster-1, unexported)
distributed-device: test_DR1_vol (1G, raid-1)
distributed-device-component: local_device_C1_DR1_leg (1G, raid-0, cluster-1)
extent: extent_C1_DR1_leg_1 (1G)
storage-volume: C1_DR1_leg (1G)
logical-unit: VPD83T3:60060160c9c02c00a49a72452eaae811
storage-array: EMC-CLARiiON-APM00111501539
distributed-device-component: local_device_C2_DR1_leg (1G, raid-0, cluster-2)
extent: extent_C2_DR1_leg_1 (1G)
storage-volume: C2_DR1_leg (1G)
logical-unit: VPD83T3:60060160c9c02c00c6243381ffa5e811
storage-array: EMC-CLARiiON-APM00111501539
备注:
查看rebuild状态:
rebuild status

对rebuild进行暂停和继续同步的操作。
注意,需要进入到device的目录下,比如要对LUN009操作,则需要执行以下命令:
VPlexcli:/clusters/cluster-1/devices> cd device_CLARiiON0017_LUN_00009_1/
VPlexcli:/clusters/cluster-1/devices/device_CLARiiON0017_LUN_00009_1>
暂停rebuild:
VPlexcli:/clusters/cluster-1/devices/device_CLARiiON0017_LUN_00009_1> set rebuild-allowed false
恢复rebuild
VPlexcli:/clusters/cluster-1/devices/device_CLARiiON0017_LUN_00009_1> set rebuild-allowed true

小兔猫的夏城站
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。