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

Re: [Xen-devel] Making snapshot of logical volumes handling HVM domU cau

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Making snapshot of logical volumes handling HVM domU causes OOPS and instability
From: Scott Garron <xen-devel@xxxxxxxxxxxxxxxxxx>
Date: Sun, 12 Sep 2010 14:48:09 -0400
Delivery-date: Sun, 12 Sep 2010 11:49:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201009121141.46734.joost@xxxxxxxxxxxx>
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: <4C7864BB.1010808@xxxxxxxxxxxxxxxxxx> <4C7D44B0.9060105@xxxxxxxxxxxxxxxxxx> <4C80AC95.5080503@xxxxxxxxxxxxxxxxxx> <201009121141.46734.joost@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3
On 9/12/2010 5:41 AM, J. Roeleveld wrote:
I also use LVMs extensively and do similar steps for backups.
1) umount in domU
2) block-detach
3) lvcreate snapshot
4) block-attach
5) mount in domU

     I think the biggest difference, here, is that you unmount and
detach the source volumes before creating the snapshot whereas I just
leave them active and mounted in the guest.  I don't know if that will
end up being the difference between stability and instability on my
system, but it's an observation and probably worth experimentation.

I, however, have no need for HVM and only use PV guests.

     It turns out that it doesn't seem isolated to HVM guests on my
system any longer.  That was just coincidental during the first few
crashes that I observed.

Are you certain the snapshots are large enough to hold all possible
changes that might occur on the LV during the existence of the
snapshot?

     Certainly.  The most recent one to cause a crash has existed
through the crash and for 3 days now, and is only using 2.65% of its COW
space.  They usually don't get a chance to go above even 0.3% before the
rsync on them is finished and they are unmounted and removed by the
backup script.

Another thing I notice, which might be of help to people who
understand this better then I do, in my backup-script, sometimes step
"5" fails because the domU hasn't noticed the device is attached
again when I try to mount it. The domU-commands are run using
SSH-connections.

     That probably just has to do with variations in how long it takes
the guest kernel to poll or be notified of device changes, and how long
it takes for its udev to create the device files and whatnot.
Introducing some sanity checks or just a longer delay in your backup
script would likely get around that problem.  (I could be wrong, though)

--
Scott Garron

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