Bug 455339 - [RHEL5 Xen]: PV disks don't have a /sys/block/sdd/device/state field
[RHEL5 Xen]: PV disks don't have a /sys/block/sdd/device/state field
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel-xen (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: Xen Maintainance List
Martin Jenner
Depends On:
Blocks: 514490
  Show dependency treegraph
Reported: 2008-07-14 17:38 EDT by Corey Marthaler
Modified: 2010-11-30 03:37 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-30 03:37:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2008-07-14 17:38:43 EDT
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 17:57:11 EDT
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 15:14:44 EDT
Corey, given the comment #1, is this still an issue?
Comment 4 Corey Marthaler 2008-09-03 14:54:47 EDT
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 03:09:07 EDT
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 10:14:52 EDT
This is a kernel space issue, not userspace
Comment 9 Corey Marthaler 2008-11-11 10:32:41 EST
Clearing TB flag...
Comment 17 Paolo Bonzini 2010-08-04 07:25:59 EDT
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 10:28:47 EST
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 03:37:04 EST
Ok, closing then.

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