From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan Harper Date: Thu, 03 Jun 2010 20:01:03 +0000 Subject: Re: [PATCH 1/3] Add virtioblk_id tool to extract drive serial numbers Message-Id: <20100603200103.GO19185@us.ibm.com> List-Id: References: <1275592024-2625-2-git-send-email-ryanh@us.ibm.com> In-Reply-To: <1275592024-2625-2-git-send-email-ryanh@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org * Kay Sievers [2010-06-03 14:53]: > On Thu, Jun 3, 2010 at 21:07, Ryan Harper wrote: > > Use the 'VBID' virtio-blk ioctl to extract drive serial numbers > > to be used for building disk/by-id symlinks. =A0After 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=3D1 > > ID_TYPE=3Ddisk > > ID_VIRTIO_SERIAL=3DQM00001 >=20 > Yikes! An ioctl to copy a plain string, and an entire binary to call > that ioctl and print it. If we don't have enough problems we make new > ones? :) >=20 > What's the reason to drop the ATA identify, that would work out-of-the > box without any of this stuff. It could also support WWN, which is > what people are looking for these days. http://www.mail-archive.com/qemu-devel@nongnu.org/msg24321.html 1. Virtio-blk isn't an ATA device 2. The ATA identify page is too large to fit into the virtio config space I'm not finding the older threads where this was discussed in detail. I'll keep looking if the above isn't a sufficient explaination. --=20 Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@us.ibm.com