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-users

Re: [Xen-users] restoring files to guest domains

To: "Fajar A. Nugraha" <fajar@xxxxxxxxx>
Subject: Re: [Xen-users] restoring files to guest domains
From: Nico Kadel-Garcia <nkadel@xxxxxxxxx>
Date: Thu, 06 Mar 2008 08:37:11 +0000
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 06 Mar 2008 00:37:54 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=NKWh4dv15rWJ/XhziDnSCDZ2Nt5rseey6wqFglNdGLU=; b=OHhbyDiR/PpvNKxOE9hmaJx9pw0YKhB32Q2pPEi03jSPIWbaLrcTT4F8KOEQu6SXy+4ZgP+DTiKc8phKbUgaYo+RAjFDVzHAZDIO2C0sSv2aPoKDfrAy4hpznMk23kt6TKitV7DVC5k5q1cAJ4WIxqHK7oWiyT5K9fsvIVEE+b0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=R2bXe7T+RizTSrE0u3JazbaDmlYYYRAFDoaCNTWYgcNrpxekqJwI4lYAJrFsmqVCqVyRw/eMJMZLywX9qevy0uHoYxPBOnGoXoxnuVd33gYxOE75SLKRAfyGqhnRaP+jHwqlyebEkUnPqe3GrLS2wr+JHkXnL2hdSsadpUeevk4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47CF84D0.9000305@xxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <47CF70A8.50803@xxxxxxxxxxx> <47CF84D0.9000305@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)
Fajar A. Nugraha wrote:
Jared wrote:
From what I've read of LVM, v2 includes read/write support. So, I'd think that I could do the following and it'd just work:

lvcreate -L 50G -s -n guest-backup /dev/vg1/guest-disk
mount -t ext3 -o rw /dev/vg1/guest-backup /mnt/snapshot
cp /mnt/backup/guest/etc/fstab /mnt/snapshot/etc/fstab.restore
umount /mnt/snapshot/
lvremove -f /dev/vg1/guest-backup


Dude, it doesn't work that way.
The way I see it, you're writing data to /dev/vg1/guest-backup, but then you REMOVE the LV afterwards. And you expect it to show up on /dev/vg1/guest-disk?
Don't run the "mount". Use "xm" to export that LVM snapshot to the guest domain, and mount it *inside* the guest domain. Then unmount, unexport it, and flush the snapshot.

Alternatively, you can completely shut down the guest and mount both partitions and copy things to the old guest partition, but I don't think you want to do that.

By the way, why are you using partition based LVM images, rather than disk based LVM images?



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