diff options
author | Sage Weil <sage@inktank.com> | 2012-10-25 21:21:18 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-11-12 11:53:19 -0800 |
commit | 0c9bbb3b4b4dbe6f0a12960785e35af9c748701a (patch) | |
tree | 844077474b60e7ceebe59e921abf81ccb5e1ab07 /src | |
parent | b4004806ec387915ba4e039b9bc1c563273ef08f (diff) | |
download | ceph-0c9bbb3b4b4dbe6f0a12960785e35af9c748701a.tar.gz |
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 <sage@inktank.com>
(cherry picked from commit 402e1f5319a52c309eca936081fddede1f107268)
Diffstat (limited to 'src')
-rwxr-xr-x | src/ceph-disk-prepare | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ceph-disk-prepare b/src/ceph-disk-prepare index d8e59eac4cc..e5c4bdb9050 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) |