lkml.org 
[lkml]   [2011]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC Patch] virtio: export model and type in /sys
On Mon, Jan 31, 2011 at 08:02:19AM -0600, Anthony Liguori wrote:
> Uniquely identify the disk or identify the class of disk?
>
> If it's the former, would serial be a better attribute to key off of?

It wouldn't just be the better way but the only working way.

From one of my test systems:

$ for i in /sys/block/*/device; do echo "vendor = $(cat $i/vendor) model = $(cat $i/model) type = $(cat $i/type)"; done
vendor = ServeRA model = RAID 1 type = 0
vendor = HP model = MSA2012fc type = 0
vendor = HP model = MSA2012fc type = 0
vendor = HP model = MSA2012fc type = 0
vendor = HP model = MSA2012fc type = 0
vendor = NETAPP model = LUN type = 0
vendor = NETAPP model = LUN type = 0
vendor = MATSHITA model = UJDA780 DVD/CDRW type = 5



\
 
 \ /
  Last update: 2011-02-01 18:43    [W:0.058 / U:17.744 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site