[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: "Fajar A. Nugraha" <fajar@xxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.