summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Marangone <alexandre.marangone@inktank.com>2013-04-19 15:09:28 -0700
committerSage Weil <sage@inktank.com>2013-04-29 13:53:26 -0700
commit418cff585bf6fc292d260a464369d82f7cdb3b79 (patch)
tree66c5fe60b9f12013a249bdb9ad27f049aac26998
parent1a6b87ea48c3bcd3904d888a2ad1e5774aa2de8e (diff)
downloadceph-418cff585bf6fc292d260a464369d82f7cdb3b79.tar.gz
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 <alexandre.marangone@inktank.com> (cherry picked from commit 56619ab91732bd2eacbef388311954f4e0230a30)
-rwxr-xr-xsrc/ceph-disk6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index af50c77339b..de76f3c8c52 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,
)