...
Info | ||||
---|---|---|---|---|
manually fail-over The procedure for manual transfer is as follows.
|
Resource down
You can stop the resource with the bsradm down command. down stops in the reverse order of the up process described above, and if the resource was in the promoted state, demotes first. In short, resource demotion, replication disconnection, volume detach, and resource release in the following order.
...
It can be used to skip the initial sync by creating a new Current UUID and clearing the Bitmap UUID. This use case only works for the metadata just created.
On both nodes, initialize the meta and configure the device. bsradm -- --force create-md res
Start resources of both nodes and recognize each other's volume size at the time of initial handshake. bsradm up res
When both nodes are connected as Secondary / Secondary, Inconsistent / Inconsistent, create a new UUID and clear the bitmap. bsradm new-current-uuid --clear-bitmap res
Now both nodes are in Secondary / Secondary, UpToDate / UpToDate state, and promote one side to Primary to create a file system. bsradm primary res mkfs -t fs-type $(bsradm sh-dev res)
One obvious side effect of this approach is that the replica is full of old garbage (unless you make it the same using other methods), it is expected to find the number of unsynchronized blocks when online verification. This method should never be used in situations where the volume already has data. At first glance it may seem to work, but once you switch to another node, the data that was already there is not replicated, so the data is broken.
...
Adjusting the synchronization speed
When synchronization is running in the background, the data on the target data is temporarily in an inconsistent state. This inconsistent state should be kept as short as possible , which is good in terms of to ensure consistency, so it is advantageous beneficial to have a sufficient high enough synchronization speedrate. However, replication and synchronization share the same network band, and if the synchronization band is set high, relatively few replication bands can be provided. Lowering the replication bandwidth affects will be given relatively little bandwidth. If the replication band is lowered, it will affect local I/O latency and consequently lowers result in local I/O performance of the active server. Because either side of degradation. If either replication or synchronization unilaterally occupies a lot of bands unilaterallybandwidth, it affects will affect the operation behavior of the other side relatively, so bsr implements we implement variable-rate synchronization that adequately adjusts the synchronization band according to the replication situation while guaranteeing the replication band as much as possible. bsr use it as band synchronization, which guarantees the replication band as much as possible while moderating the synchronization band according to the replication situation, and this is the default policy. ConverselyIn contrast, the fixed-rate synchronization policy is generally not recommended and should only be used in special situations, as it can lead to a decrease in band synchronization policy, which guarantees the synchronization band at all times regardless of replication, can cause local I/O performance when degradation if used during server operation in a way that ensures synchronization bands regardless of replication, so it is not generally recommended and should be used only in special situations.
Info |
---|
Replication and synchronization
To clearly differentiate these differences, bsr always describes replication and synchronization separately. |
Info |
---|
It is pointless makes no sense to set the synchronization speed sync rate to a value higher than the maximum disk write speed of the standby node. Since Because the standby node is the target of ongoing device synchronization in progress, the synchronization speed sync rate cannot be faster than the write speed of the its I/O subsystem that the standby node allows. For the same reason, setting it makes no sense to set the sync speed rate to a value higher than the bandwidth available on the replication network makes no sense. |
Fixed rate synchronization
...
The resync-rate and c-min-rate settings are specified in bytes per second. The default unit is Kibibyte, and the value of 4096 is interpreted as 4 MiB.
Info |
---|
Important IfDynamically adjusts the synchronization rate when the c-plan-ahead parameter is set to a positive value , the synchronization speed is dynamically adjusted. This value is set to 20 by default , but this valueand should be set to 0 for fixed-rate synchronization speed. c-min-rate is a parameter to set the minimum synchronization speed when replication and synchronization are performed simultaneously. This value is set to 250k by default, and if you want to guarantee a fixed synchronization speed, you should set it to the same value as resync-rate. |
Variable rate synchronization
...
Variable rate synchronization
Fixed-rate synchronization is not an optimal method when multiple resources share a replication/synchronization network. Because they share the same network, if a synchronization rate is occupied for a specific replication resource channel, other resources are not guaranteed a fixed synchronization rate. In this case, you can mitigate that the synchronization rate is occupied by configuring to dynamically adjust the synchronization rate of each replication channel through variable rate synchronization. bsr determines the initial sync speed in this mode and then continuously adjusts the sync speed through an automatic control loop algorithm. This algorithm ensures sufficient bandwidth for foreground replication and greatly mitigates the impact of background synchronization on foreground I/O.
The optimal configuration for variable rate synchronization may vary depending on the available network bandwidth, application I/O pattern, and replication link congestion, and the optimal configuration setting may vary depending on whether replication accelerator(DRX) is used.
Info |
---|
c-min-rate guarantees a minimum synchronization rate of a specified size, regardless of whether you have a fixed-bandwidth or variable-bandwidth setting. |
Info |
---|
Synchronization speed estimation You can estimate the synchronization time with the following formula. tresync = D/R
|
Set the synchronization ratio
You can also set the synchronization rate as a percentage of the replication bandwidth.
Code Block |
---|
resource <resource> {
disk {
c-min-rate 40M;
resync-ratio "3:1";
...
}
...
} |
The example above sets the synchronization band to a ratio of 3 replication to 1 synchronization (4 total). However, the sync ratio is compared to the c-min-rate and if the c-min-rate is higher, it is applied as the c-min-rate value. This ensures that you have the minimum amount of synchronization bandwidth.
Congestion mode
Info |
---|
Used only in asynchronous replication. |
...
The following is an example of creating a scheduled task using schtasks (windows schedule setting command). With the following settings, online verification is performed every Sunday at 00:42 AM.
|