Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

manually fail-over

The procedure for manual transfer is as follows.

  1. Stop all applications or services using the bsr device on the primary node, and demote the resource to secondary (after umounting the volume on Linux).

    Code Block
    bsradm secondary <resource>
  2. Execute the following command on the node you want to promote to primary. Restart the service (after mounting the volume on Linux case).

    Code Block
    bsradm primary <resource>

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.

  1. On both nodes, initialize the meta and configure the device. bsradm -- --force create-md res

  2. Start resources of both nodes and recognize each other's volume size at the time of initial handshake. bsradm up res

  3. 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

  4. 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

  • Replication is the action to reflect the I/O of the disk change occurring locally to the target in real time. replication is performed in the context where the incremental I/O is written to the local disk, thus affecting the local I/O latency.

  • Synchronization is the operation of matching the data on the source side disk with the data on the target side by out-of-sync area of the entire disk volume this is processed from 0 sector to last sector of volume sequentially.

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 

If

Dynamically 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 value

and 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

    • tresync is the estimated synchronization time.

    • D is the size of the data to be synchronized under the assumption that it is rarely affected (such as data being modified in the event of a broken network link).

    • R is the tunable synchronization rate, which has different limits depending on the replication network environment and the processing performance of the I/O subsystem.

    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.

    Code Block
     schtasks /create /tn "drbd_verify" /tr "%wdrbd_path%\verify.bat" /sc WEEKLY /D sun /st 00:42