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

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


  • From: "Fajar A. Nugraha" <fajar@xxxxxxxxx>
  • Date: Thu, 06 Mar 2008 12:44:48 +0700
  • Cc: xen-users@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 05 Mar 2008 21:45:12 -0800
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

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?

Like I said, I must either be really dense or I'm just misunderstanding the meaning of "read/write" here, because the file is certainly not being written as I'd expect.

The "read/write" part means you (should) be able to create a snapshot of an LV, and write new data to that snapshot. The data will then be available ONLY to the snapshot, not to the original LV.

To accomplish what you're looking for, you must copy the file using either scp (or some other network-file-transfer), or shutdown the guest and mount the LV on dom0.

This is different from (lets say) Solaris Zones, where a non-global zone filesystem is visible from the global zone. In this case you can write files from the global zone and have the non-global zone see the new data. I believe it's not recommended to do so, but it works, since both global and none global zone can have simultaneous access to the same filesystem. It won't work with Xen.

If you absolutely must have the "feature" above, you might want to look at solaris and brandZ zones. Basically it allows you to run some linux distros on top of solaris kernel, giving global zone and brandZ zone access to the same filesystem.

Regards,

Fajar

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
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®.