[Bug 1443542] Re: curtin race on vivid when /dev/sda1 doesn't exist
Oleg Strikov
oleg.strikov at canonical.com
Thu May 14 13:13:25 UTC 2015
Execution of blockdev --rereadpt simply issues a call to
ioctl(BLKRRPART) which forces kernel to re-initialize its metadata.
Kernel adds information about newly created partition here:
http://lxr.linux.no/#linux+v3.19.1/block/partition-generic.c#L269 You
can see a call to kobject_uevent() which puts event to udev's queue. So
to me it looks like udev settle should have all the information
available. Only if blockdev succeeds though. We don't check its return
code if I got it correctly.
Another interesting point is that there are two popular ways to re-read
the partition table: BLKRRPAR ioctl (used by blockdev) and BLKPG ioctl
(used by partprobe). They are very different. While BLKRRPAR lets kernel
know that partition table needs to be re-read, BLKPG tells kernel the
exact partitioning layout (parted does this because it wants to have
ultimate control over things). BLKPG may be more udev-friendly because
parted-based tools are more popular. We may want to try partprobe
instead of blockdev and see if it solves the issue.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to curtin in Ubuntu.
https://bugs.launchpad.net/bugs/1443542
Title:
curtin race on vivid when /dev/sda1 doesn't exist
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/curtin/+bug/1443542/+subscriptions
More information about the Ubuntu-server-bugs
mailing list