From: Sage Weil Date: Fri, 26 Oct 2012 04:21:18 +0000 (-0700) Subject: ceph-disk-prepare: poke kernel into refreshing partition tables X-Git-Tag: v0.48.3argonaut~31 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0c9bbb3b4b4dbe6f0a12960785e35af9c748701a;p=ceph.git ceph-disk-prepare: poke kernel into refreshing partition tables Prod the kernel to refresh the partition table after we create one. The partprobe program is packaged with parted, which we already use, so this introduces no new dependency. Signed-off-by: Sage Weil (cherry picked from commit 402e1f5319a52c309eca936081fddede1f107268) --- diff --git a/src/ceph-disk-prepare b/src/ceph-disk-prepare index d8e59eac4ccd..e5c4bdb9050b 100755 --- a/src/ceph-disk-prepare +++ b/src/ceph-disk-prepare @@ -337,6 +337,13 @@ def prepare( journal, ], ) + subprocess.check_call( + args=[ + # also make sure the kernel refreshes the new table + 'partprobe', + journal, + ], + ) except subprocess.CalledProcessError as e: raise PrepareError(e) @@ -354,6 +361,13 @@ def prepare( disk, ], ) + subprocess.check_call( + args=[ + # also make sure the kernel refreshes the new table + 'partprobe', + disk, + ], + ) except subprocess.CalledProcessError as e: raise PrepareError(e)