Skip to content

Commit

Permalink
Use partx to update partition table
Browse files Browse the repository at this point in the history
partprobe does not appear to work in virtual machines. Let's find out if
`partx -u` does the same thing and also works on virt.

Change-Id: I4467299a82e728930ac8f99a0ba16d3ea7c6755c
Closes-Bug: #1418833
  • Loading branch information
jimrollenhagen authored and jayofdoom committed Feb 6, 2015
1 parent 5714454 commit 877f668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ironic_python_agent/shell/copy_configdrive_to_disk.sh
Expand Up @@ -41,9 +41,9 @@ DEVICE="$2"
[[ -f $CONFIGDRIVE ]] || usage "$CONFIGDRIVE (CONFIGDRIVE) is not a regular file"
[[ -b $DEVICE ]] || usage "$DEVICE (DEVICE) is not a block device"

# We need to run partprobe to ensure all partitions are visible so the
# We need to run partx -u to ensure all partitions are visible so the
# following blkid command returns partitions just imaged to the device
/sbin/partprobe $DEVICE || fail "running partprobe against $DEVICE"
partx -u $DEVICE || fail "running partx -u $DEVICE"

# Check for preexisting partition for configdrive
EXISTING_PARTITION=`/sbin/blkid -l -o device $DEVICE -t LABEL=config-2`
Expand Down

0 comments on commit 877f668

Please sign in to comment.