From: Sage Weil Date: Wed, 21 Aug 2013 05:39:09 +0000 (-0700) Subject: ceph-disk: partprobe after creating journal partition X-Git-Tag: v0.67.3~20 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=39adc0195e6016ce36828885515be1bffbc10ae1;p=ceph.git 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 (cherry picked from commit 2af59d5e81c5e3e3d7cfc50d9330d7364659c5eb) (cherry picked from commit 3e42df221315679605d68b2875aab6c7eb6b3cc4) --- diff --git a/src/ceph-disk b/src/ceph-disk index dce6224080e5..3d09bdf7418f 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', ],