]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: partprobe after creating journal partition
authorSage Weil <sage@inktank.com>
Wed, 21 Aug 2013 05:39:09 +0000 (22:39 -0700)
committerSage Weil <sage@inktank.com>
Mon, 26 Aug 2013 20:14:18 +0000 (13:14 -0700)
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)

src/ceph-disk

index 86c079a2923befd34f7964c90b21f4288c2998e8..aaa91266c7669f5cd5c01d970857a66514aa16b9 100755 (executable)
@@ -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',
                 ],