]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cleaned up the patch
author"Owen Synge" <osynge@suse.com>
Thu, 7 Aug 2014 09:47:13 +0000 (11:47 +0200)
committer"Owen Synge" <osynge@suse.com>
Thu, 7 Aug 2014 09:47:13 +0000 (11:47 +0200)
0017-Fix-disk-zap-sgdisk-invocation.patch [new file with mode: 0644]
0017-cephdisk-Preparing-a-block-device-a.patch [deleted file]
ceph.changes
ceph.spec

diff --git a/0017-Fix-disk-zap-sgdisk-invocation.patch b/0017-Fix-disk-zap-sgdisk-invocation.patch
new file mode 100644 (file)
index 0000000..744b6f0
--- /dev/null
@@ -0,0 +1,35 @@
+From: Owen Synge <osynge@suse.com>
+Date: Thu, 7 Aug 2014 11:23:09 +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.
+
+Based on patch by Lars Marowsky-Bree <lmb@suse.com> in ceph-deploy.
+Created by Vincent Untz <vuntz@suse.com>
+---
+ src/ceph-disk | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/ceph-disk b/src/ceph-disk
+index c67f2f3..1113135 100755
+--- a/src/ceph-disk
++++ b/src/ceph-disk
+@@ -916,6 +916,13 @@ def zap(dev):
+             [
+                 'sgdisk',
+                 '--zap-all',
++                '--',
++                dev,
++            ],
++        )
++        command_check_call(
++            [
++                'sgdisk',
+                 '--clear',
+                 '--mbrtogpt',
+                 '--',
diff --git a/0017-cephdisk-Preparing-a-block-device-a.patch b/0017-cephdisk-Preparing-a-block-device-a.patch
deleted file mode 100644 (file)
index 5ee33c3..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Owen Synge <osynge@suse.com>
-Date: Thu, 7 Aug 2014 10:21:18 +0200
-Subject: [PATCH] cephdisk:Preparing a block device add --mbrtogpt to sgdisk.
-
-Convert an MBR or BSD disklabel disk to a GPT disk. As a  safety
-measure,  use of this option is required on MBR or BSD disklabel
-disks if you intend to save your changes, in  order  to  prevent
-accidentally damaging such disks.
----
- src/ceph-disk | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/ceph-disk b/src/ceph-disk
-index c67f2f3..0920b68 100755
---- a/src/ceph-disk
-+++ b/src/ceph-disk
-@@ -1191,6 +1191,7 @@ def prepare_dev(
-             command_check_call(
-                 [
-                     'sgdisk',
-+                    '--mbrtogpt',
-                     '--largest-new=1',
-                     '--change-name=1:ceph data',
-                     '--partition-guid=1:{osd_uuid}'.format(
index 0d860623b266281c318a802b1a5cd917bc3b827d..99209fea6ba289c3524aaa42a6d97b6f164efb90 100644 (file)
@@ -6,7 +6,7 @@ Thu Aug  7 10:37:32 UTC 2014 - osynge@suse.com
   + Accepted patch from Dirk Mueller <dmueller@suse.com>
 - Install 95-ceph-osd-alt.rules on older suse versions.
   + Fix bnc#890736
-  + Suggestion from Dirk Mueller <dmueller@suse.com>
+  + Suggestion from Vincent Untz <vuntz@suse.com>
 
 -------------------------------------------------------------------
 Thu Aug  7 08:45:27 UTC 2014 - tbehrens@suse.com
index 7d325737428c3c968e4b4cd078f6c99401e0ab42..bd9573e8f1aba6758b2b7deab15a0c014928c47e 100644 (file)
--- a/ceph.spec
+++ b/ceph.spec
@@ -115,7 +115,7 @@ Patch0013:      0013-osd-OSD.cc-parse-lsb-release-data-v.patch
 Patch0014:      0014-osdmaptool-test-map-pgs.t-fix-escap.patch
 Patch0015:      0015-Convert-remaining-init-script-actio.patch
 Patch0016:      0016-Fix-bnc-890345-wrong-service-name-f.patch
-Patch0017:      0017-cephdisk-Preparing-a-block-device-a.patch
+Patch0017:      0017-Fix-disk-zap-sgdisk-invocation.patch
 # Please do not add patches manually here, run update_git.sh.
 
 #################################################################################