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

Subject: 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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47CF70A8.50803@xxxxxxxxxxx>
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.12 (X11/20080227)
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