Skip to contentSkip to conversation

drbdsetup: Allow zeroing out devices locally to instead of initial full sync.

PATCH New Nick Wang 1 participant 1 message Jul 21, 2015 DRBD driver

lore
Share & tools
lore

Nick Wang

author
#0 lore raw

PATCH 1/1 drbdsetup: Allow zeroing out devices locally to instead of initial full sync.

Full sync for drbd initial usually take a long time, allow "--zap-devices" on "new-current-uuid" to zero out device on both side.

---
 documentation/v84/drbdsetup.xml | 9 +++++++++
 user/v84/config_flags.c         | 1 +
 user/v84/linux/drbd_genl.h      | 1 +
 3 files changed, 11 insertions(+)
documentation/v84/drbdsetup.xml +9 -0
index d4c4e87..a44b733 100644
@@ -1705,6 +1705,15 @@
               <para>Clears the sync bitmap in addition to generating a new current UUID.</para>
             </listitem>
           </varlistentry>
+
+          <varlistentry>
+            <term><option>--zap-devices</option></term>
+
+            <listitem>
+              <para>Start to zeroing out the device on both side in addition to generating
+              a new current UUID .</para>
+            </listitem>
+          </varlistentry>
         </variablelist></para>
 
       <para>This can be used to skip the initial sync, if you want to start from scratch. This
user/v84/config_flags.c +1 -0
index 3b0303f..8712a11 100644
@@ -1019,6 +1019,7 @@ struct context_def new_current_uuid_cmd_ctx = {
 	NLA_POLICY(new_c_uuid_parms),
 	.fields = {
 		{ "clear-bitmap", FLAG(clear_bm) },
+		{ "zap-devices", FLAG(zap_devices) },
 		{ } },
 };
 
user/v84/linux/drbd_genl.h +1 -0
index 8ddedd1..0b850d3 100644
@@ -238,6 +238,7 @@ GENL_struct(DRBD_NLA_START_OV_PARMS, 9, start_ov_parms,
 
 GENL_struct(DRBD_NLA_NEW_C_UUID_PARMS, 10, new_c_uuid_parms,
 	__flg_field(1, DRBD_GENLA_F_MANDATORY, clear_bm)
+	__flg_field(2, DRBD_GENLA_F_MANDATORY, zap_devices)
 )
 
 GENL_struct(DRBD_NLA_TIMEOUT_PARMS, 11, timeout_parms,
Signature · 1 line
1.8.4.5