Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 455339 - [RHEL5 Xen]: PV disks don't have a /sys/block/sdd/device/state field
Summary: [RHEL5 Xen]: PV disks don't have a /sys/block/sdd/device/state field
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel-xen
Version: 5.3
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Xen Maintainance List
QA Contact: Martin Jenner
Depends On:
Blocks: 514490
TreeView+ depends on / blocked
Reported: 2008-07-14 21:38 UTC by Corey Marthaler
Modified: 2010-11-30 08:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-11-30 08:37:04 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Corey Marthaler 2008-07-14 21:38:43 UTC
Description of problem:
There is no state for a device in the Xen world:

[root@taft-03 device]# cat /sys/block/sdd/device/state

We (storage QA) use this for device failure testing.

Comment 1 Chris Lalancette 2008-07-14 21:57:11 UTC
I'm going to go ahead and assume you mean paravirtualized guests here, since the
dom0 should be using regular SCSI drivers (and hence, should have the state

With paravirtualized guests, scsi devices are sort of emulated using a ring
device; as such, they aren't real SCSI devices, and don't really respond to SCSI
commands as normal.

That being said, having a "state" doesn't really make a lot of sense for
paravirtualized guests, since for all practical purposes, they can't fail.  The
underlying block device in the dom0 might fail, but that is a test in the dom0,
not in the domU; the domU is just at the mercy of the dom0.  What exactly are
you trying to test?

Chris Lalancette

Comment 3 Bill Burns 2008-08-04 19:14:44 UTC
Corey, given the comment #1, is this still an issue?

Comment 4 Corey Marthaler 2008-09-03 18:54:47 UTC
We are trying to test lvm mirror device failures and our tests do that by toggling on and off the state of the device. We can not do that on domUs. I thought that the virtual machines were supposed to be "the same as" real machines in just about every way?

Comment 5 Chris Lalancette 2008-09-04 07:09:07 UTC
No, that's clearly not true.  In terms of userland applications, for the most part, yes, there is no difference with paravirtualized guests.  But for things that interact with certain parts of the kernel directly, that is not true today, and will likely never be true.

Chris Lalancette

Comment 6 Daniel Berrange 2008-09-19 14:14:52 UTC
This is a kernel space issue, not userspace

Comment 9 Corey Marthaler 2008-11-11 15:32:41 UTC
Clearing TB flag...

Comment 17 Paolo Bonzini 2010-08-04 11:25:59 UTC
Would it be possible to hotplug/hotunplug the disk on the host (e.g. via ssh), instead of changing the state on the guest?

Comment 18 Paolo Bonzini 2010-11-24 15:28:47 UTC
Corey, what do you think about the workaround in comment #17?  I did similar work for Windows drivers and it is certainly possible to do it for Linux as well, but if a workaround in the host is feasible, that would be much simpler.

Comment 22 Paolo Bonzini 2010-11-30 08:37:04 UTC
Ok, closing then.

Note You need to log in before you can comment on or make changes to this bug.