In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces you how the process of Hyper-V Replica resynchronization is, the content is very detailed, interested friends can use it for reference, hope to be helpful to you.
When the topic of Hyper-V Replica resynchronization attracts people's attention, the first question you may ask is: why do you need to resynchronize the virtual machines participating in Hyper-V Replica? When do I need to resynchronize? If the Hyper-V master server realizes that the replication of the virtual machine is not *, or that it does not know what to replicate, then resynchronization is required.
Resynchronization is needed if the virtual machine is in a critical state, or if the primary server loses control of the tracked changes and cannot determine the starting point of replication. In this case, the primary server needs to start from scratch, which includes deleting the recovery history content (HRL file) and creating a benchmark for the VHD file to be copied.
Resynchronization is required when the following conditions are met:
You make changes to the VHD file by using any method other than the methods available to Hyper-V Manager. In other words, the Hyper-V replication engine must be aware of any changes to the VHD file included in the Hyper-v replication engine so that the changes can be recorded in the HRL file.
The accumulation of HRL (Hyper-V replication logs) is more than 50%.
There was a problem writing to the HRL file.
The HRL file could not be closed successfully.
In any of these cases, if the virtual machine needs to be resynchronized, there will be an error message in "replication health". The error message reads: "A virtual machine needs to be resynchronized." resume replication in order to start resynchronization. " If this information is displayed, the virtual machine must be resynchronized with the help of a replica virtual machine (Replica Virtual Machine).
Please note that any connection problems between the primary server and the replication server must be resolved before you start resynchronizing.
There are two ways to resynchronize the contents of the virtual machine: (1) by restoring the replicated contents on the primary virtual machine in Hyper-V Manager, or (2) by using the PowerShell cmdlet mini command.
From the Hyper-V Manager, you can right-click Virtual Machine > Replication > and then select the "Resume Replication" option to resume replication or start the resynchronization process.
To start a resynchronization operation through PowerShell, use Resume-VMReplication cmdlet, as follows:
Resume-VMReplication-VMName "MyVM"-Resynchronize-ResynchronizeStartTime "02 Universe 11 Universe 12:00:00"
You can start the resynchronization process manually, even if resynchronization is not required, or if the Hyper-V replica has not put the virtual machine into the "need to resynchronize" (Resynchronization Required) state, but we recommend avoiding it unless absolutely necessary.
Only if you think that the contents of the virtual machine are not fully synchronized and you need to resynchronize to correct the problem, proceed with manual resynchronization. During the manually triggered resynchronization process, the virtual machine is first paused, and then the resynchronization operation is started.
Suspend-VMReplication-VMName "MyVM"
Resume-VMReplication-VMName "MyVM"-Resynchronize
You can use Hyper-V Manager to schedule resynchronization operations for each virtual machine. Right-click the virtual machine participating in the Hyper-V Replica and select "Settings". In the left panel, select the Resynchronization option, and then in the right panel, modify the settings as needed, as shown in the following screenshot:
As you can see from this screenshot, you can configure three settings for resynchronization: (1) manual, (2) automatic, and (3) at specified intervals. It is recommended that you configure and use the third option ("automatically start resynchronization only during the following periods"), and then change resynchronization to occur only during off-peak hours.
You can also use the Set-VMReplication and Get-VMReplication PowerShell cmdlet commands to configure and view resync settings, as shown in the following command:
Disable the command for automatic resynchronization:
Set-VMReplication-VMName "MyVM"-AutoResynchronizeEnabled 0
Enable the command for automatic resynchronization:
Set-VMReplication-VMName "RESYNC VM"-AutoResynchronizeEnabled 1-AutoResynchronizeIntervalStart 00:00:00-AutoResynchronizeIntervalEnd 23:59:59
To check the resync settings, use the Get-VMReplication PowerShell cmdlet mini-command, as follows:
Get-VMReplication-VMName "MyVM" | ft *-auto
To check the settings of all virtual machines participating in Hyper-V Replica, use this command:
Get-VMReplication * | ft *-auto
In the Get-VMReplication output, look for the columns AutoResynchronizeEnabled, AutoResynchronizeIntervalStart, and AutoResynchronizeIntervalEnd and their corresponding values.
How does the resynchronization process work?
The resynchronization process goes through the following steps:
1. Resynchronization events occur, manually or automatically.
two。 The VHD dimensions of the primary and replica virtual machines are checked.
3. During the resynchronization process, the primary server begins to track changes in VHD.
4. Writes are tracked in the HRL file and are replicated once the resynchronization process is complete.
5. Event number 29242 is logged, which records the name of the virtual machine, the VHD file, and the starting and ending blocks of the VHD file.
6. Create a differential disk for VHD. This is because if you need to cancel the resynchronization operation, it can be easily canceled.
7. At the end of the resynchronization operation, the differential disk is incorporated into the VHD file.
8. At this stage, VHD compares and then synchronizes. This comparison is made on a block-by-block basis, and only different blocks are sent over the network. This mechanism reduces the amount of data sent over the network.
9. At the end of the resynchronization process, event number 29244 is logged to the primary server. Event number ID 29244 contains information about the VHD that was replicated, the name of the virtual machine, the block sent, the time it was executed, and the result of the operation.
10. At this stage, the changes have been successfully incorporated into the VHD file, so the operation cannot be cancelled.
11. All recovery points and HRL files have been deleted.
As you know, resynchronization is a process in which all recovery points are deleted and the master virtual machine is ready for new replication. This is very similar to when you copy a virtual machine.
The overall goal of the resynchronization process is to ensure that the primary server starts tracking changes in VHD files again and that replication can be restored as usual. Therefore, "manual" resynchronization is used only when:
If the primary server is no longer replicated to the replica server, and a considerable number of changes are made at the primary virtual machine.
If you suspect that the contents of the master virtual machine are not consistent with those of the copied virtual machine.
About the process of Hyper-V Replica resynchronization is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Ps-ef | grep netstat | awk-F''{print $2}'| xargs kill-9
© 2024 shulou.com SLNews company. All rights reserved.