From 56619ab91732bd2eacbef388311954f4e0230a30 Mon Sep 17 00:00:00 2001 From: Alexandre Marangone Date: Fri, 19 Apr 2013 15:09:28 -0700 Subject: [PATCH] Fix journal partition creation With OSD sharing data and journal, the previous code created the journal partiton from the end of the device. A uint32_t is used in sgdisk to get the last sector, with large HD, uint32_t is too small. The journal partition will be created backwards from the a sector in the midlle of the disk leaving space before and after it. The data partition will use whichever of these spaces is greater. The remaining will not be used. This patch creates the journal partition from the start as a workaround. Signed-off-by: Alexandre Marangone --- src/ceph-disk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ceph-disk b/src/ceph-disk index 68a171938c59..73c158a6ece1 100755 --- a/src/ceph-disk +++ b/src/ceph-disk @@ -704,11 +704,9 @@ def prepare_journal_dev( num = None if journal == data: # we're sharing the disk between osd data and journal; - # make journal be partition number 2, so it's pretty; put - # journal at end of free space so partitioning tools don't - # reorder them suddenly + # make journal be partition number 2, so it's pretty num = 2 - journal_part = '{num}:-{size}M:0'.format( + journal_part = '{num}:0:{size}M'.format( num=num, size=journal_size, ) -- 2.47.3