From: Lars Marowsky-Bree Date: Wed, 25 Jun 2014 15:12:24 +0000 (+0200) Subject: Fix "disk zap" sgdisk invocation X-Git-Tag: v1.5.6~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F200%2Fhead;p=ceph-deploy.git Fix "disk zap" sgdisk invocation 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. --- diff --git a/ceph_deploy/osd.py b/ceph_deploy/osd.py index 7fc405d..5066e01 100644 --- a/ceph_deploy/osd.py +++ b/ceph_deploy/osd.py @@ -370,6 +370,14 @@ def disk_zap(args): [ 'sgdisk', '--zap-all', + '--', + disk, + ], + ) + process.run( + distro.conn, + [ + 'sgdisk', '--clear', '--mbrtogpt', '--',