Bug 483180 - disk detachment doesn't clean up Xen state fully, leaving block device unusable
disk detachment doesn't clean up Xen state fully, leaving block device unusable
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Daniel Veillard
Depends On:
  Show dependency treegraph
Reported: 2009-01-29 21:24 EST by Dmitrii
Modified: 2010-05-25 22:01 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-05-25 22:01:06 EDT
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 Dmitrii 2009-01-29 21:24:47 EST
Description of problem:

When detaching a block device from a Xen domain using either 'virsh detach-disk' or, programmatically via virDomainDetachDevice(), the block device is left in a "busy" state and cannot be used from then on, by virsh or anyone else, until the domain is terminated. The detach operation achieves partial success, though, as the device does indeed disappear inside the guest domain.  On the same system, using the same domain and the same block device, xm block-attach and block-detach work flawlessly.

Version-Release number of selected component (if applicable):

libvirt / virsh 0.5.1 (problem also seen in 0.4.6)
on 2.6.26-1-xen-amd64

How reproducible:


Steps to Reproduce:

# losetup /dev/loop1 /path/to/partition.image
# virsh attach-disk instance-name /dev/loop1 hda1
Disk attached successfully
# virsh detach-disk instance-name hda1
Disk detached successfully
# virsh attach-disk instance-name /dev/loop1 hda1
libvir: Xen Daemon error : POST operation failed: xend_post: error from xen daemon: (xend.err 'Invalid Configuration: The file "/dev/loop1" is already used')
Comment 1 Cole Robinson 2010-05-25 22:01:06 EDT
The reported libvirt version is very old now (as well as this bug). If you can reproduce with a newer libvirt and xen version, please report that info here, along with your host distro, and we can reopen this bug. Closing.

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