Re-introduce sync/partprobe in fix_disk_layout
We've seen at least one occurence of a "Device or resource busy while setting up superblock" error while setting up xvde2 which, as far as we know, is a new error. This problem was not happening before we took out sync/partprobe so let's put that back in for safe measures. Related-bug: #1706103 Change-Id: Iad1a75aa5fb4ae5a2f4a9cad6373091124917c24
This commit is contained in:
parent
e69d8b835d
commit
47b2b4d31c
|
@ -41,6 +41,9 @@
|
|||
parted ${DEV} --script -- mklabel msdos
|
||||
parted ${DEV} --script -- mkpart primary linux-swap 1 ${SWAPSIZE}
|
||||
parted ${DEV} --script -- mkpart primary ext2 8192 -1
|
||||
sync
|
||||
# We are only interested in scanning $DEV, not all block devices
|
||||
sudo partprobe ${DEV}
|
||||
|
||||
# The device partitions might not show up immediately, make sure
|
||||
# they are ready and available for use
|
||||
|
|
Loading…
Reference in New Issue