This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-users] devtype and cd/dvd drives

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] devtype and cd/dvd drives
From: Joel Becker <Joel.Becker@xxxxxxxxxx>
Date: Thu, 1 May 2008 14:01:35 -0700
Delivery-date: Thu, 01 May 2008 14:02:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: xen-users@xxxxxxxxxxxxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.17+20080114 (2008-01-14)
        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?



Life's Little Instruction Book #109

        "Know how to drive a stick shift."

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

Xen-users mailing list

<Prev in Thread] Current Thread [Next in Thread>