[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] How do I share a folder with xen guests on Linux?
Rudi Ahlers schrieb: (...) Why not? The device belongs to dom0, and it's shared with dom_U's as well :)Yes, there is. Once you've booted the Xen domaiin, you can add hte block device or ISO or other file system image to the list of block devices of the guest domain with the "xm" command, and then log into the Xen guest and mount it there. I recommend this only for read-only block devices, to avoid becoming confused about what is writing to the partition and how too manage it.Yeah, but it's not really a "shared" device then. ;)By a shared folder I understand something that can be *at least* read by more than one node (or guest, or host, for that matter). By definition, any distributed fs (gfs, ocfs2) needs something which will prevent collision - the thing is called a lock manager. And it implies network. That being said - what if we use a non-distributed fs? It doesn't need a lock manager of any kind, so it should work without network on multiple nodes? Technically, there are at least two ways to do it: 1. Mount the fs on host, write data, unmount it (unmounting is really important here). Add the device to the guest, mount it, use data, unmount it. Add the device to another guest etc. etc. However, it is doubtful we can treat it as a *shared* device - it may depend on the definition here, of course :) And manageability is poor here. 2. What happens if we mount a non-distributed fs on multiple nodes?If we mount it rw on multiple nodes, the filesystem will break sooner or later - so don't do that. If we, however, mount the filesystem rw as *ext2* on host, and ro as *ext2* on guests, it will work. Note - you have to mount it as ext2 - even if you mount ext3 as ro, the system will make writes to it (journal updates)! So, again, use ext2 (or any other fs without the journal). One problematic thing is that the nodes which mounted that fs are not aware of changes made on the filesystem by the node which has it mounted rw. Changes like adding new files, removing or changing them. What may help, is dropping cache on nodes which have the fs mounted ro, or unmounting/mounting the filesystem again. It's not perfect, error prone if there are writes we don't really control, but will work for simple cases. Note: last time I tried, Xen didn't want to add a block device to the guest if that block device was already used by the host. So it may or may not work for you. -- Tomasz Chmielewski http://wpkg.org _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |