Re: Weird behaviour with lsblk and freshly created loop device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux