← Back to team overview

cloud-init-dev team mailing list archive

Re: [Merge] ~paul-meyer/cloud-init:fix-raw-ephemeral-disk into cloud-init:master


Paul, I pulled this.
There is actually lots of errors when requesting partition re-read.
I'm not sure on 14.04, but in newer releases of udev, it actually is watching RW open on block devices, and whenever a close of such a file descriptor occurs, it requests a reread.

see /lib/udev/rules.d/60-block.rules

The end result is if you do something like:
  wipefs --all /dev/sdb
  blockdev --reread-pt /dev/sdb

I just verified this on 16.04 kvm vm:
sudo sh -c 'dev=/dev/vdb; echo 2048, > sfdisk_in; while :; do sfdisk $dev <sfdisk_in && blockdev --rereadpt $dev || break; done'

eventually you'll see:
blockdev: ioctl error on BLKRRPART: Device or resource busy

Fun, eh?

Your team cloud init development team is requested to review the proposed merge of ~paul-meyer/cloud-init:fix-raw-ephemeral-disk into cloud-init:master.