Re: [RFC Patch] virtio: export model and type in /sys

From: Christoph Hellwig
Date: Tue Feb 01 2011 - 12:41:09 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/