On Thu, Apr 13, 2006 at 10:10:42AM -0700, Greg KH wrote: > I don't see that requirement anywhere in the vol_id code. It's a > stand-alone binary that should work with just about any kernel version, > as it just talks to the block device directly. No udev requirement at > all (it just happens to live in the udev source tree for now, I think > that's changing as HAL and some other utilities are starting to rely on > it.) The blkid library/program does many things, beyond just simply identifying the filesystem type, label, and uuid given a particular device. In particular, the blkid library uses a cache (so you don't have to scan all of the attached block devices, which in the case of a system with a truly vast number of san attached storage devices, could take very long time), so that an application can find a block device given a particular label or uuid as a search parameter. That was what was originally requested, and that is something which vol_id can not do unassisted (but which blkid can do, either from the command-line or from the C library interface). Udev can provide this functionality, if you are running on a modern distribution that uses udev, and it does so by scanning all block devices at hotplug/coldplug time. I'm not entirely convinced that is the right approach if there are several hundred thousand potential devices available via a SAN fabric, or via iSCSI --- and to be fair, blkid probably won't be enough in that environment, either. But it provides a nice abstraction interface so that in the future, blkid could optionally call out to some directory service to find the location of the iSCSI device. In contrast, the udev solution to the find-the-device-given-a-uuid assumes that a symlink has been created, which makes it more difficult to trap the request to look for a particular UUID/label. > Anyway, I don't have any objection to blkid, just trying to point out > another solution, instead of having the original poster try to reinvent > the wheel again :) And I don't have an objection to udev, although I'm not convineced it's proposed solution for finding block devices given a UUID or label is the best one.... - Ted - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html