Project

General

Profile

Actions

Bug #6966

closed

ceph-disk: prepare --dmcrypt failing

Added by Tyler Brekke over 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
ceph-disk
Target version:
-
% Done:

0%

Source:
Support
Tags:
Backport:
dumpling
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

# ceph-disk prepare --dmcrypt /dev/sdh
INFO:ceph-disk:Will colocate journal with data on /dev/sdh
Information: Moved requested sector from 34 to 2048 in
order to align on 2048-sector boundaries.
The operation has completed successfully.
Information: Moved requested sector from 10485761 to 10487808 in
order to align on 2048-sector boundaries.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
ceph-disk: Error: partition 1 for /dev/sdh does not appear to exist

Looks like this is due to partprobe not being ran after creating the data partition.

This patch seems to do the trick.

diff --git a/src/ceph-disk b/src/ceph-disk
index 0691d25..df615dc 100755
--- a/src/ceph-disk
+++ b/src/ceph-disk
@@ -1044,6 +1044,12 @@ def prepare_dev(
                 )
             subprocess.call(
                 args=[
+                    'partprobe',
+                    data,
+                    ],
+            )
+            subprocess.call(
+                args=[
                     # wait for udev event queue to clear
                     'udevadm',
                     'settle',
Actions

Also available in: Atom PDF