[libvirt] [TCK PATCH] block devices: allow specification of size for safety
Dave Allan
dallan at redhat.com
Wed May 5 20:48:06 UTC 2010
On Wed, May 05, 2010 at 01:56:20PM -0600, Eric Blake wrote:
> On 05/05/2010 01:31 PM, Jim Meyering wrote:
> >> Can we provide the option to specify the device serial number so that
> >> it's really impossible to trash the wrong device?
> >
> > Given that this is a good idea, next question is obviously
> > how to get the serial number. One way seems to be via hdparm,
> > e.g., hdparm -i /dev/sda
> >
> > /dev/sda:
> >
> > Model=ST3320620AS, FwRev=3.AAK, SerialNo=9QF6ET0H
>
> Great for SCSI, not so great for USB sticks:
>
> # hdparm -i /dev/sdb
What does the following give you?
scsi_id --whitelisted --replace-whitespace --device=/dev/sdb
> /dev/sdb:
> HDIO_DRIVE_CMD(identify) failed: Invalid exchange
> HDIO_GET_IDENTITY failed: Invalid argument
> # echo $?
> 22
>
> --
> Eric Blake eblake at redhat.com +1-801-349-2682
> Libvirt virtualization library http://libvirt.org
>
More information about the libvir-list
mailing list