]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
Fix "disk zap" sgdisk invocation 200/head
authorLars Marowsky-Bree <lmb@suse.com>
Wed, 25 Jun 2014 15:12:24 +0000 (17:12 +0200)
committerLars Marowsky-Bree <lmb@suse.com>
Wed, 25 Jun 2014 15:12:24 +0000 (17:12 +0200)
If the metadata on the disk is truly invalid, sgdisk would fail to zero
it in one go, because --mbrtogpt apparently tried to operate on the
metadata it read before executing --zap-all.

Splitting this up into two separate invocations to first zap everything
and then clear it properly fixes this issue.

ceph_deploy/osd.py

index 7fc405d83a3714144f7255084cdc064901819267..5066e019a200001e4937922bbd0974ceaaf9a2f6 100644 (file)
@@ -370,6 +370,14 @@ def disk_zap(args):
             [
                 'sgdisk',
                 '--zap-all',
+                '--',
+                disk,
+            ],
+        )
+        process.run(
+            distro.conn,
+            [
+                'sgdisk',
                 '--clear',
                 '--mbrtogpt',
                 '--',