On Tue, Sep 02, 2014 at 09:03:45AM +0200, Francis Moreau wrote: > It seems that lsblk uses udev to get some block device metadata and asks > some others to the kernel. If so, it makes the whole process racy > because udev might not have handled the events sent by the kernel yet. > > I'm not sure why udev is used by default in the first place, what are * info from udev is accessible for non-root users * it's better to scan devices only once on one place only * udev is able to gather information from more sources (for example libblkid does not provide WWN) > the benefits ? Using libblkid, at least by default seems the right thing > to do. > > Otherwise maybe lsblk should do the equivalent of 'udevadm settle' to > handle correctly freshly created devices ? That's question, now (because it's not hardcoded to lsblk) everyone is able to control this behavior, all you need is to add 'udevadm settle' to your use-case. The problem I see is that there is no any hint about this behavior in lsblk man page. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html