From 775adfee88ad45fa880b3078c691e5337ebd1bfc Mon Sep 17 00:00:00 2001 From: Lars Marowsky-Bree Date: Wed, 25 Jun 2014 17:12:24 +0200 Subject: [PATCH] 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. --- ceph_deploy/osd.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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', '--', -- 2.47.3