summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Marangone <alexandre.marangone@inktank.com>2013-04-19 15:09:28 -0700
committerAlexandre Marangone <alexandre.marangone@inktank.com>2013-04-19 15:11:09 -0700
commit56619ab91732bd2eacbef388311954f4e0230a30 (patch)
tree021c144e797fa178ee3350a8c7fb34b72aae9b11
parentd395aa521e8a4b295ed2b08dd7cfb7d9f995fcf7 (diff)
downloadceph-56619ab91732bd2eacbef388311954f4e0230a30.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>
-rwxr-xr-xsrc/ceph-disk6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index 68a171938c5..73c158a6ece 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,
)