]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk-prepare: do partprobe after setting final partition type
authorSage Weil <sage@inktank.com>
Fri, 15 Feb 2013 01:04:55 +0000 (17:04 -0800)
committerSage Weil <sage@inktank.com>
Fri, 26 Apr 2013 20:40:02 +0000 (13:40 -0700)
This is necessary to kick udev into processing the updated partition and
running its rules.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 95835de9f80712eb26652ac6b66ba9c5eeb093d6)

src/ceph-disk-prepare

index a31ba79cbddb5df76ed96f981166776116fb9c4b..6670a528103181e3dc36d83a11689c05b9ec4f43 100755 (executable)
@@ -566,6 +566,13 @@ def prepare_dev(
                     data,
                     ],
                 )
+            subprocess.check_call(
+                args=[
+                    # also make sure the kernel refreshes the new table
+                    'partprobe',
+                    data,
+                    ],
+                )
         except subprocess.CalledProcessError as e:
             raise PrepareError(e)