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


Re: [Xen-devel] testing that volumes are not currently attached to loopb

To: James Harper <james.harper@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] testing that volumes are not currently attached to loopback devices
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Thu, 9 Apr 2009 13:49:29 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 09 Apr 2009 05:50:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D0162D064@trantor>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AEC6C66638C05B468B556EA548C1A77D0162D064@trantor>
Reply-to: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Thu, Apr 09, 2009 at 10:42:58PM +1000, James Harper wrote:
> xend will not start a domain if one of the block devices is currently
> mounted elsewhere, but it will not detect if the device is currently
> attached to a loopback device. I wouldn't have thought this a problem,
> provided that the loop device itself wasn't in use, but it causes all
> sorts of strange things to happen.
> My loop device was mounted with the following command 'losetup --offset
> 32256 /dev/loop4 /dev/vg00/virt-domu_name-0', which allows me to mount
> the filesystem with ntfs-3g (32256 is the offset of the partition in the
> disk image).
> The symptoms were that windows would BSoD shortly after login, chkdsk
> always reported errors (as done under the recovery console) and changes
> made in the DomU filesystem didn't seem to stick. As soon as I
> un-attached the loopback device (losetup -d) all those problems went
> away. For some strange reason this didn't result in the total
> destruction of the filesystem :)
> The box I'm testing this on is 3.1.x... is it fixed in any later
> versions? Any idea how to detect if a volume is attached via losetup?
> Any idea why this causes a problem at all?

Loop devices won't flush out writes to disk for an arbitrary amount
of time, and of course also have read cache.

If your Xen guest  accesses the same underlying file, using direct
I/O I imagine you could be seeing inconsistent data from the file

|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Xen-devel mailing list

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