> From: Reindl Harald <h.rei...@thelounge.net> > Am 20.11.2015 um 18:08 schrieb aaron_wri...@selinc.com: > > I have a script that creates a partition (using pyparted) and then tries > > to format it (using mkfs.ext4). Most of the time this works OK. However, > > sometimes the format fails because it can't find the device. There seems > > to be a race condition due to a delay between creating a partition and > > the device node in /dev being created. > > > > Is there a tool in udev or udevadm that can help my script know when it > > safe to proceed? > > just call "partprobe" for that device, that works even when you clone > MBR including partition table with dd
I've been over the code for partprobe and pyparted and they both do the same thing (they use the same code). They tell the kernel about the partition, but it seems to be asynchronous as to when the kernel gets around to making the device node. I thought maybe udev could help me out because it may be listening to the same "events" or whatnot that would cause the device node to get created.
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel