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: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] restoring files to guest domains
From: Jared <list-xen@xxxxxxxxxxx>
Date: Thu, 06 Mar 2008 10:01:01 -0600
Delivery-date: Thu, 06 Mar 2008 08:00:30 -0800
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 (X11/20080227)
On 03/05/2008 11:44 PM, Fajar A. Nugraha wrote:
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?

OK, so I'm officially being dense.  I can live with that.  :-)

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.

I understand what you're saying, and when dealing with normal filesystem mounts I'd fully expect that behavior, but the LVM snapshots are throwing me for a loop. There are two things that made me believe this would work:

* What's the purpose of allowing write support to a snapshot if the written files are not populated on the original volume? I don't get the "benefit" of being able to write to a snapshot if the changes will be completely discarded.

* Snapshots work, based on my very limited understanding at this point, on essentially caching changes made to the source volume while the snapshot exists, then flushing those changes to disk once the snapshot is removed. Based on that, and on the bullet above, I figured there may be some "reverse" caching or something (for lack of a better term) that would flush changes written to the snapshot back to the source volume as well.

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.

That's what I'm trying to avoid doing. Shutting down the guest is definitely not an option. I know I could do that and directly mount the volume from the host pretty easily, but I don't want to interrupt the services running on that guest. scp has always been my fallback option, but I'm trying to come up with a more direct solution. Since I'm working with volumes created and managed on the host, it seems reasonable to assume that there should be some way to write data to the volumes.

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.

Interesting. I can't say I have much desire to switch over to Solaris, though. :-) This isn't an absolutely "must have" feature, it'd just be really nice.

Thanks for the detailed response.  It definitely helps clear some things up.

--
Jared

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