Merge branch 'stable-2.12' into stable-2.13
[ganeti-github.git] / lib / storage / drbd.py
index 215a0f4..3d0c8c0 100644 (file)
@@ -655,6 +655,8 @@ class DRBD8Dev(base.BlockDev):
       ldisk_status = constants.LDS_OKAY
     elif stats.is_diskless:
       ldisk_status = constants.LDS_FAULTY
+    elif stats.is_in_resync:
+      ldisk_status = constants.LDS_SYNC
     else:
       ldisk_status = constants.LDS_UNKNOWN
 
@@ -1024,7 +1026,8 @@ class DRBD8Dev(base.BlockDev):
     # can be bigger
     result = utils.RunCmd([constants.DD_CMD,
                            "if=/dev/zero", "of=%s" % dev_path,
-                           "bs=1048576", "count=128", "oflag=direct"])
+                           "bs=%s" % constants.DD_BLOCK_SIZE, "count=128",
+                           "oflag=direct"])
     if result.failed:
       base.ThrowError("Can't wipe the meta device: %s", result.output)