WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] losetup -d fails when domU is destroyed

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] losetup -d fails when domU is destroyed
From: "Kirk Allan" <kallan@xxxxxxxxxx>
Date: Mon, 08 May 2006 09:24:26 -0600
Delivery-date: Mon, 08 May 2006 08:24:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I do not see this happen very often, but every once in a while after a domU is 
destroyed the loop device is still in use.  From the /var/log/messages file I 
see:

May  8 08:54:00 kdell logger: /etc/xen/scripts/block: remove 
XENBUS_PATH=backend/vbd/3/768

In the xen-hotplug.log there is an entry
                             
ioctl: LOOP_CLR_FD: Device or resource busy

It appears that when the /etc/xen/scripts/block script goes to remove the 
device with the losetup -d ?$node? that the device is still busy and the 
command fails.  But by the time you can enter losetup -d /dev/<loopdevice> from 
the command line, the device is no longer busy and the command succeeds.

As a test I modified the /etc/xen/scripts/block script to sleep 1 and try the 
losetup -d again if the first try failed.  After many attempts to cause the 
problem, it finally happened.  The first losetup -d failed and the second 
succeeded.  Although this worked, it doesn't seem to be the correct solution to 
the underlying problem.  Any help or guidance would greatly be appreciated.

Thanks,
Kirk


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

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