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

[Xen-users] devtype and cd/dvd drives



Folks,
        Playing with a mainline PVM kernel, I was trying to determine
whether a virtual device is a cd/dvd.  What do I mean?

- A scsi disk has /sys/block/<name>/device/type.  If that contains '0',
  it's a hard disk.  If not, it's something else (cd/tape/etc).  This
  includes SATA, iSCSI, etc.  Anything using sd.c.
- An IDE disk has /sys/block/<name>/device/media.  If that contains
  'disk' it's a disk.  It can also contain 'cdrom', 'tape', etc.  This
  used to live at /proc/ide/<name>/media.

        How do I determine this for xvdX devices?
/sys/block/xvda/device has "devtype", but does it contain 'vbd' for
cdroms as well?  Every example I see online suggests using hdc (IDE) for
cdroms still - will cdroms stay IDE?  Should I assume that xvd devices
are hard disks always and forever?

Joel

-- 

Life's Little Instruction Book #109

        "Know how to drive a stick shift."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@xxxxxxxxxx
Phone: (650) 506-8127

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.