Re: [libvirt] [TCK PATCH] block devices: allow specification of size for safety

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

 



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
> 
> /dev/sdb:
>  HDIO_DRIVE_CMD(identify) failed: Invalid exchange
>  HDIO_GET_IDENTITY failed: Invalid argument
> # echo $?
> 22

Using a device path in /dev/disk/by-id/ would make more sense than
specifying /dev/sdX if you're concerned about hitting the wrong disk.

-jim

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]