* Kay Sievers <kay.sievers@xxxxxxxx> [2010-06-14 08:30]: > On Mon, Jun 14, 2010 at 15:15, Ryan Harper <ryanh@xxxxxxxxxx> wrote: > > * Kay Sievers <kay.sievers@xxxxxxxx> [2010-06-14 03:55]: > >> On Thu, Jun 10, 2010 at 21:16, Ryan Harper <ryanh@xxxxxxxxxx> wrote: > >> > Use the 'VBID' virtio-blk ioctl to extract drive serial numbers > >> > to be used for building disk/by-id symlinks. After extracting > >> > the serial number of the device it prints out the minimum info > >> > needed in a similar format to `scsi_id --export` so that the > >> > persistent-storage rules can process the serial information. > >> > > >> > This program depends on the virtio-blk serial device patches posted > >> > here[1] being applied to qemu and linux-kernel. > >> > > >> > Here is what the output looks like: > >> > > >> > % ./virtioblk_id /dev/vdb > >> > ID_VIRTIO=1 > >> > ID_TYPE=disk > >> > ID_SERIAL=QM00001 > >> > ID_SERIAL_SHORT=QM00001 > >> > >> As requested in the ealier mail. Please provide a good reason why the > >> kernel code can not create a "serial" file (or whatever fits your > >> needs) in sysfs at the block device. > > > > I didn't see you respond John's email: > > > > http://www.spinics.net/lists/hotplug/msg03869.html > > > > which included quite bit of the gory history on this topic. > > Yeah, and I don't find any reason there, why a sysfs attribute will not work. You were quite right; the sysfs attribute route was rather simple. Thanks for pointing me in the right direction. We've got the kernel-side fix picked up. I've posted v3 of this series that uses the sysfs attribute. Thanks! -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@xxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html