{"id":498,"date":"2025-05-03T21:51:39","date_gmt":"2025-05-04T01:51:39","guid":{"rendered":"https:\/\/zdtdevops.com\/web\/?p=498"},"modified":"2025-05-04T00:46:15","modified_gmt":"2025-05-04T04:46:15","slug":"zdt-replicate-complete-configuration-guide","status":"publish","type":"post","link":"https:\/\/zdtdevops.com\/web\/zdt-replicate-complete-configuration-guide\/","title":{"rendered":"ZDT Replicate: Complete Configuration Guide"},"content":{"rendered":"<h1>ZDT Replicate: Complete Configuration Guide<\/h1>\r\n<!-- \/wp:post-content -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Welcome to our comprehensive guide on configuring ZDT Replicate, a powerful tool that simplifies DRBD (Distributed Replicated Block Device) management for Zero Downtime deployments. Whether you&#8217;re setting up high availability within a single datacenter or implementing disaster recovery across multiple sites, this guide will help you understand all available configuration options.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:image {\"align\":\"center\",\"id\":123,\"sizeSlug\":\"large\",\"linkDestination\":\"none\"} -->\r\n<figure class=\"wp-block-image aligncenter size-large\"><br \/>\r\n<figcaption class=\"wp-element-caption\"><br \/><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-500 aligncenter\" src=\"https:\/\/zdtdevops.com\/web\/wp-content\/uploads\/2025\/05\/ZDT-DevOps-Replicate-Architecture.png\" alt=\"ZDT DevOps Replicate Architecture\" width=\"560\" height=\"767\" srcset=\"https:\/\/zdtdevops.com\/web\/wp-content\/uploads\/2025\/05\/ZDT-DevOps-Replicate-Architecture.png 560w, https:\/\/zdtdevops.com\/web\/wp-content\/uploads\/2025\/05\/ZDT-DevOps-Replicate-Architecture-219x300.png 219w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/figcaption>\r\n<\/figure>\r\n<!-- \/wp:image -->\r\n\r\n<!-- wp:heading -->\r\n<h2>Configuration File Basics<\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>ZDT Replicate uses a simple environment file (<code>zdtreplicate.env<\/code>) to store all configuration parameters.<\/p>\r\n<p><strong>This file must be located in your ZDT DevOps installation config directory:<\/strong><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:code \/-->\r\n\r\n<!-- wp:paragraph -->\r\n<p>The file uses a simple KEY=VALUE format, with parameters organized into logical sections. If the file doesn&#8217;t exist, you&#8217;ll need to create it in the correct location before running zdtreplicate commands.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:callout {\"type\":\"info\"} -->\r\n<div class=\"wp-block-callout info\"><strong>Important<\/strong>: Make sure you have appropriate permissions to write to the config directory. In most installations, this requires sudo or administrator privileges.<\/div>\r\n<!-- \/wp:callout -->\r\n\r\n<!-- wp:heading -->\r\n<h2>Node Configuration<\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_NODE_TYPE<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>This parameter defines the role of the node in your replication topology.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Possible values<\/strong><\/td>\r\n<td><code>primary<\/code>, <code>secondary<\/code>, <code>mirror<\/code>, <code>external<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>primary<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>\r\n<ul>\r\n<li><code>primary<\/code>: Active node that serves data (read\/write access)<\/li>\r\n<li><code>secondary<\/code>: Standby node in local cluster for quick failover<\/li>\r\n<li><code>mirror<\/code>: Node that replicates data to external datacenter<\/li>\r\n<li><code>external<\/code>: Node in separate datacenter receiving replication<\/li>\r\n<\/ul>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_NODE_TYPE=primary<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_NODE_ID<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>A unique identifier for this node in the DRBD configuration.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td>None (required)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>Should be a simple string without spaces<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_NODE_ID=nodeA<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_CLUSTER_ADDR<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>IP address or hostname of this node.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>127.0.0.1<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>Used for DRBD network communication<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_CLUSTER_ADDR=192.168.1.1<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_DISK_DEVICE<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Block device to be used for DRBD replication.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>\/dev\/sdb1<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>The device will store replicated data. <strong>Warning<\/strong>: All data on this device will be erased during setup.<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_DISK_DEVICE=\/dev\/sdb1<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_DATA_DIR<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Directory where the DRBD device will be mounted.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>\/var\/lib\/etcd<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>Typically where your application (e.g., etcd) will store its data<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_DATA_DIR=\/var\/lib\/etcd<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading -->\r\n<h2>Replication Configuration<\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_REPLICATION_PROTOCOL<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>DRBD replication protocol determining data consistency vs. performance trade-offs.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Possible values<\/strong><\/td>\r\n<td><code>A<\/code>, <code>B<\/code>, <code>C<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>C<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>\r\n<ul>\r\n<li><code>A<\/code>: Asynchronous replication (fastest, potential data loss)<\/li>\r\n<li><code>B<\/code>: Semi-synchronous (confirms network receipt, not disk write)<\/li>\r\n<li><code>C<\/code>: Synchronous (slowest but safest, no data loss)<\/li>\r\n<\/ul>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Recommendation<\/strong><\/td>\r\n<td>Use <code>C<\/code> for local nodes, <code>A<\/code> for cross-datacenter replication<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_REPLICATION_PROTOCOL=C<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_REPLICATION_PORT<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Base TCP port for DRBD replication.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>7788<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>DRBD will use this port for network communication. Make sure this port is open in your firewall.<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_REPLICATION_PORT=7788<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_BANDWIDTH_LIMIT<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Network bandwidth limit for replication.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>0<\/code> (unlimited)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Format<\/strong><\/td>\r\n<td>Number followed by K, M, or G (e.g., 10M for 10 megabits\/sec)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>Especially useful for cross-datacenter replication to avoid network saturation<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_BANDWIDTH_LIMIT=10M<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading -->\r\n<h2>Remote Node Addresses<\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_PRIMARY_ADDR<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>IP address of the primary node.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td>Empty<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Required for<\/strong><\/td>\r\n<td>Secondary and mirror nodes<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_PRIMARY_ADDR=192.168.1.1<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_SECONDARY_ADDR<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>IP address of the secondary node.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td>Empty<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Required for<\/strong><\/td>\r\n<td>Mirror nodes<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_SECONDARY_ADDR=192.168.1.2<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_MIRROR_ADDRS<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Comma-separated list of mirror node addresses.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td>Empty<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Required for<\/strong><\/td>\r\n<td>External nodes<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_MIRROR_ADDRS=10.0.0.1,10.0.0.2,10.0.0.3<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading -->\r\n<h2>Monitoring Configuration<\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_MONITOR_INTERVAL<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Time between status checks in seconds.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>60<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>Controls how frequently the monitor command checks replication status<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_MONITOR_INTERVAL=60<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_MONITOR_LOG_PATH<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Full path to monitoring log file.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>\/var\/log\/zdtreplicate.log<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>The monitor command will write status information to this file<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_MONITOR_LOG_PATH=\/var\/log\/zdtreplicate.log<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading -->\r\n<h2>NFS Configuration (Optional)<\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_NFS_ENABLED<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Enable NFS exports of the DRBD device.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Possible values<\/strong><\/td>\r\n<td><code>true<\/code>, <code>false<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>false<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>Automatically configure NFS sharing of the replicated data. Useful for Kubernetes PVC integration.<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_NFS_ENABLED=true<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_NFS_EXPORTS_DIR<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Directory to export via NFS.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>\/mnt\/etcd-data<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>Typically the same as ZDTREP_DATA_DIR or a subdirectory<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_NFS_EXPORTS_DIR=\/mnt\/etcd-data<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_NFS_ALLOWED_CLIENTS<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Clients allowed to access the NFS export.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>*<\/code> (all clients)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Format<\/strong><\/td>\r\n<td>NFS exports syntax (* for all, IP\/subnet for specific clients)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_NFS_ALLOWED_CLIENTS=192.168.0.0\/24<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_NFS_OPTIONS<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>NFS export options.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>rw,sync,no_subtree_check<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Common options<\/strong><\/td>\r\n<td>\r\n<ul>\r\n<li><code>rw<\/code>: Allow read\/write access<\/li>\r\n<li><code>sync<\/code>: Synchronous writes (safer)<\/li>\r\n<li><code>no_subtree_check<\/code>: Disable subtree checking (better performance)<\/li>\r\n<li><code>no_root_squash<\/code>: Allow root access (use with caution)<\/li>\r\n<\/ul>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_NFS_OPTIONS=rw,sync,no_subtree_check<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading -->\r\n<h2>Advanced Options<\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_METADATA_OPTIONS<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Additional options for DRBD metadata creation.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td>Empty<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>These options are passed directly to the &#8216;drbdadm create-md&#8217; command<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_METADATA_OPTIONS=--max-peers=32<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>ZDTREP_RESOURCE_NAME_PREFIX<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Prefix for DRBD resource names.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:table -->\r\n<figure class=\"wp-block-table\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Default<\/strong><\/td>\r\n<td><code>etcd-data<\/code><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Description<\/strong><\/td>\r\n<td>The full resource name will be this prefix followed by the node ID<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Example<\/strong><\/td>\r\n<td><code>ZDTREP_RESOURCE_NAME_PREFIX=etcd-data<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n<!-- \/wp:table -->\r\n\r\n<!-- wp:heading -->\r\n<h2>Creating and Editing the Configuration File<\/h2>\r\n<p>&nbsp;<\/p>\r\n<p>The <code>zdtreplicate.env<\/code> configuration file is available for download from the ZDT DevOps community repository on GitHub:<\/p>\r\n<p>\ud83d\udc49 <a href=\"https:\/\/github.com\/ZDTDevOps\/community\/blob\/main\/config\/zdtreplicate.env\">Download zdtreplicate.env<\/a><\/p>\r\n<p>After downloading, place it in your configuration directory:<\/p>\r\n<pre><code class=\"language-bash\">&lt;your ZDT DevOps Installation path&gt;\/DevOps\/config\/zdtreplicate.env\r\n<\/code><\/pre>\r\n<p>Then, set the appropriate permissions:<\/p>\r\n<pre><code class=\"language-bash\">sudo chmod 644 &lt;your ZDT DevOps Installation path&gt;\/DevOps\/config\/zdtreplicate.env\r\n<\/code><\/pre>\r\n<p>You can still use your preferred text editor (e.g., <code>nano<\/code>, <code>vim<\/code>, <code>code<\/code>) to review or customize the configuration file as needed.<\/p>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:heading -->\r\n<h2>Configuration Examples<\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>Primary Node in Main Datacenter<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:code -->\r\n<pre class=\"wp-block-code\"><code>ZDTREP_NODE_TYPE=primary\r\nZDTREP_NODE_ID=nodeA\r\nZDTREP_CLUSTER_ADDR=192.168.1.1\r\nZDTREP_DISK_DEVICE=\/dev\/sdb1\r\nZDTREP_DATA_DIR=\/var\/lib\/etcd\r\nZDTREP_REPLICATION_PROTOCOL=C\r\nZDTREP_REPLICATION_PORT=7788\r\nZDTREP_NFS_ENABLED=true\r\nZDTREP_NFS_EXPORTS_DIR=\/mnt\/etcd-data<\/code><\/pre>\r\n<!-- \/wp:code -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>Secondary Node in Main Datacenter<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:code -->\r\n<pre class=\"wp-block-code\"><code>ZDTREP_NODE_TYPE=secondary\r\nZDTREP_NODE_ID=nodeB\r\nZDTREP_CLUSTER_ADDR=192.168.1.2\r\nZDTREP_DISK_DEVICE=\/dev\/sdb1\r\nZDTREP_DATA_DIR=\/var\/lib\/etcd\r\nZDTREP_PRIMARY_ADDR=192.168.1.1\r\nZDTREP_REPLICATION_PROTOCOL=C\r\nZDTREP_REPLICATION_PORT=7788<\/code><\/pre>\r\n<!-- \/wp:code -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>Mirror Node in External Datacenter<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:code -->\r\n<pre class=\"wp-block-code\"><code>ZDTREP_NODE_TYPE=mirror\r\nZDTREP_NODE_ID=dcmirror\r\nZDTREP_CLUSTER_ADDR=10.0.0.1\r\nZDTREP_DISK_DEVICE=\/dev\/sdb1\r\nZDTREP_DATA_DIR=\/var\/lib\/etcd\r\nZDTREP_PRIMARY_ADDR=192.168.1.1\r\nZDTREP_SECONDARY_ADDR=192.168.1.2\r\nZDTREP_REPLICATION_PROTOCOL=A\r\nZDTREP_REPLICATION_PORT=7788\r\nZDTREP_BANDWIDTH_LIMIT=10M<\/code><\/pre>\r\n<!-- \/wp:code -->\r\n\r\n<!-- wp:heading -->\r\n<h2>Troubleshooting<\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>If you encounter issues with your configuration:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:list {\"ordered\":true} -->\r\n<ol>\r\n<li>Verify that the configuration file exists in the correct location (<code>&lt;your ZDT DevOps Installation path&gt;\/DevOps\/config\/zdtreplicate.env<\/code>)<\/li>\r\n<li>Check that the file has the correct permissions (readable by the ZDT system)<\/li>\r\n<li>Check the log file specified in <code>ZDTREP_MONITOR_LOG_PATH<\/code><\/li>\r\n<li>Verify that the disk device specified in <code>ZDTREP_DISK_DEVICE<\/code> exists and is not in use<\/li>\r\n<li>Ensure network connectivity between nodes on the port specified in <code>ZDTREP_REPLICATION_PORT<\/code><\/li>\r\n<li>Check firewall rules to allow DRBD traffic between nodes<\/li>\r\n<\/ol>\r\n<!-- \/wp:list -->\r\n\r\n<!-- wp:heading -->\r\n<h2>Conclusion<\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>The ZDT Replicate configuration system is designed to be flexible yet straightforward, allowing you to set up complex replication topologies with minimal effort. By properly configuring the parameters described in this guide and placing the configuration file in the correct ZDT DevOps config directory, you can create a robust Zero Downtime infrastructure that protects your data against both hardware failures and datacenter outages.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph \/-->\r\n\r\n<!-- wp:paragraph -->\r\n<p>If you have questions or need assistance with your ZDT Replicate configuration, please reach out to our support team.\u00a0<\/p>\r\n<p class=\"wpcf7-contact-form-not-found\"><strong>Error:<\/strong> Contact form not found.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>&nbsp;<\/p>\r\n<!-- \/wp:paragraph -->","protected":false},"excerpt":{"rendered":"<p>ZDT Replicate: Complete Configuration Guide Welcome to our comprehensive guide on configuring ZDT Replicate, a powerful tool that simplifies DRBD (Distributed Replicated Block Device) management for Zero Downtime deployments. Whether you&#8217;re setting up high availability within a single datacenter or implementing disaster recovery across multiple sites, this guide will help you understand all available configuration [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60,3,24,59],"tags":[72,75,77,66,76,74,65,62,71,79,69,64,68,67,78,73,70,80,61,63],"class_list":["post-498","post","type-post","status-publish","format-standard","hentry","category-configuration-guides","category-devops","category-security","category-zdt-devops-guides","tag-asynchronous-data-mirroring","tag-block-level-replication","tag-cross-datacenter-replication","tag-data-synchronization","tag-datacenter-failover","tag-devops-configuration-management","tag-disaster-recovery-solutions","tag-drbd-configuration","tag-drbd-synchronous-replication","tag-enterprise-data-protection","tag-etcd-data-replication","tag-high-availability-replication","tag-kubernetes-storage-replication","tag-multi-datacenter-replication","tag-network-bandwidth-management","tag-nfs-configuration-for-kubernetes","tag-zdt-devops-platform","tag-zdt-platform-configuration","tag-zdt-replicate","tag-zero-downtime-devops"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/zdtdevops.com\/web\/wp-json\/wp\/v2\/posts\/498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zdtdevops.com\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zdtdevops.com\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zdtdevops.com\/web\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zdtdevops.com\/web\/wp-json\/wp\/v2\/comments?post=498"}],"version-history":[{"count":7,"href":"https:\/\/zdtdevops.com\/web\/wp-json\/wp\/v2\/posts\/498\/revisions"}],"predecessor-version":[{"id":542,"href":"https:\/\/zdtdevops.com\/web\/wp-json\/wp\/v2\/posts\/498\/revisions\/542"}],"wp:attachment":[{"href":"https:\/\/zdtdevops.com\/web\/wp-json\/wp\/v2\/media?parent=498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zdtdevops.com\/web\/wp-json\/wp\/v2\/categories?post=498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zdtdevops.com\/web\/wp-json\/wp\/v2\/tags?post=498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}