diff options
author | Sage Weil <sage@inktank.com> | 2013-08-20 22:39:09 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-08-26 13:14:18 -0700 |
commit | 234d68c68028fcf9c2665cb9f45b9b76556241ba (patch) | |
tree | f8cfe1a93ec839e6556ddb05c2daf5e2c34da223 | |
parent | cf2f31ac23b6eb43a81a1c8157907b9cae4d58a7 (diff) | |
download | ceph-234d68c68028fcf9c2665cb9f45b9b76556241ba.tar.gz |
ceph-disk: partprobe after creating journal partition
At least one user reports that a partprobe is needed after creating the
journal partition. It is not clear why sgdisk is not doing it, but this
fixes ceph-disk for them, and should be harmless for other users.
Fixes: #5599
Tested-by: lurbs in #ceph
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 2af59d5e81c5e3e3d7cfc50d9330d7364659c5eb)
-rwxr-xr-x | src/ceph-disk | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ceph-disk b/src/ceph-disk index 86c079a2923..aaa91266c76 100755 --- a/src/ceph-disk +++ b/src/ceph-disk @@ -851,9 +851,21 @@ def prepare_journal_dev( journal, ], ) + + # try to make sure the kernel refreshes the table. note + # that if this gets ebusy, we are probably racing with + # udev because it already updated it.. ignore failure here. + LOG.debug('Calling partprobe on prepared device %s', journal) + subprocess.call( + args=[ + 'partprobe', + journal, + ], + ) + + # wait for udev event queue to clear subprocess.call( args=[ - # wait for udev event queue to clear 'udevadm', 'settle', ], |