Hi, I need to share some files between VMs. This files will be used to transfer some information (read/write). But I need do it without any network resource (NFS or others). I''ve tried to do it sharing a partition just for test proposes, but i see that when i create a file on one VM another can''t see it and there isnt any concurrence in this approach. Anyone can help me?? Thanks -- Luciano Barreto _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Feb 14, 2011 at 1:37 PM, lucianobarreto@gmail.com <lucianobarreto@gmail.com> wrote:> I need to share some files between VMs. This files will be used to transfer > some information (read/write). But I need do it without any network resource > (NFS or others). I''ve tried to do it sharing a partition just for test > proposes, but i see that when i create a file on one VM another can''t see it > and there isnt any concurrence in this approach. > Anyone can help me??to share files, you need a shared filesystem. there are two main classes of these: - network filesystems: NFS, Samba, 9p, etc. these work really well; you shouldn''t reject them without good reason. - clustered filesystems: GFS, OCFS2, CXFS, etc. they''re designed for SAN systems where several hosts access the same storage box. in VM case, if you create a single partition accessible from several VMs you get exactly the same situation, (shared block device) and need the same solution. what definitely won''t work is to use a ''normal'' filesystem (ext3/4, XFS, ReiserFS, FAT, HPFS, NTFS, etc) on a shared partition (just like it won''t work in a shared block device). Since every filesystem aggressively caches metadata to avoid rereading the disk for every access, a VM won''t be ''notified'' if another one modifies a directory, so it won''t ''notice'' any change. and worse, since now the cached metadata isn''t consistent with the content of the disk, any write will result in a heavily corrupted filesystem. better go with NFS -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
lucianobarreto@gmail.com wrote:>I need to share some files between VMs. This files will be used to >transfer some information (read/write). But I need do it without any >network resource (NFS or others). I''ve tried to do it sharing a >partition just for test proposes, but i see that when i create a >file on one VM another can''t see it and there isnt any concurrence >in this approach. >Anyone can help me??Do it via networking. Think of each virtual machine guest as though it was running on a separate bare metal computer and that''s about what you get with Xen in terms of inter-system communications. It might be possible to do it by sharing a virtual disk, but you will NEED to run a cluster file system on it with appropriate software on each machine that accesses it. Without a cluster filesystem, then you are absolutely guaranteed to get terminal filesystem corruption. This would in effect be very similar to running a cluster FS on a network volume. For networking there are many options depending on your needs. Clearly you could set up a share via NFS (or any other file sharing service you like), via tools like RCP or SCP, via something like rsync (which works very well as a service), or several other options. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Le 14/02/2011 20:05, Simon Hobson a écrit :>> I need to share some files between VMs. This files will be used to >> transfer some information (read/write). But I need do it without any >> network resource (NFS or others). I''ve tried to do it sharing a >> partition just for test proposes, but i see that when i create a file >> on one VM another can''t see it and there isnt any concurrence in this >> approach. >> Anyone can help me?? > > Do it via networking. Think of each virtual machine guest as though it > was running on a separate bare metal computer and that''s about what > you get with Xen in terms of inter-system communications. > > It might be possible to do it by sharing a virtual disk, but you will > NEED to run a cluster file system on it with appropriate software on > each machine that accesses it. Without a cluster filesystem, then you > are absolutely guaranteed to get terminal filesystem corruption. > This would in effect be very similar to running a cluster FS on a > network volume. > > For networking there are many options depending on your needs. Clearly > you could set up a share via NFS (or any other file sharing service > you like), via tools like RCP or SCP, via something like rsync (which > works very well as a service), or several other options.Maybe you can make it by avoiding cache with directio or raw device, But you will have to implement a locking system, unless you''re sure the different VM''s don''t modify data at the same time I never tried however, and , is there really a point ? I ''d like to listen to your purpose here, i think it could be interresting. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Feb 14, 2011 at 2:25 PM, Erwan RENIER <erwan.renier@laposte.net> wrote:> Maybe you can make it by avoiding cache with directio or raw device, > But you will have to implement a locking system, unless you''re sure the > different VM''s don''t modify data at the same timethat''s called a "cluster filesystem" -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Sorry if duplicated... Thanks guys, let me expose my problem. I''m prototyping a fault tolerance server (byzantine fault tolerance). Vms need do comunicate each order for make decisions about requests. My host will be out of network (cant access anything) and my Vms can comunicate to the external world, but the decision need to be local. Yes, I could comunicate via network inside VM to exchange information but my propose is to have a reliable local share to do it. In another work a friend used a Virtualbox folder share to do it, but now I need increase performance and use Xen to do it. About clustered filesystems, any options to use it in a normal block device like Sata HD or SCSI? I understand..."clustered"... but any option? Thanks and I will get more information about clustered filesystems 2011/2/14 Javier Guerra Giraldez <javier@guerrag.com>> On Mon, Feb 14, 2011 at 1:37 PM, lucianobarreto@gmail.com > <lucianobarreto@gmail.com> wrote: > > I need to share some files between VMs. This files will be used to > transfer > > some information (read/write). But I need do it without any network > resource > > (NFS or others). I''ve tried to do it sharing a partition just for test > > proposes, but i see that when i create a file on one VM another can''t see > it > > and there isnt any concurrence in this approach. > > Anyone can help me?? > > to share files, you need a shared filesystem. there are two main > classes of these: > > - network filesystems: NFS, Samba, 9p, etc. these work really well; > you shouldn''t reject them without good reason. > > - clustered filesystems: GFS, OCFS2, CXFS, etc. they''re designed for > SAN systems where several hosts access the same storage box. in VM > case, if you create a single partition accessible from several VMs you > get exactly the same situation, (shared block device) and need the > same solution. > > what definitely won''t work is to use a ''normal'' filesystem (ext3/4, > XFS, ReiserFS, FAT, HPFS, NTFS, etc) on a shared partition (just like > it won''t work in a shared block device). Since every filesystem > aggressively caches metadata to avoid rereading the disk for every > access, a VM won''t be ''notified'' if another one modifies a directory, > so it won''t ''notice'' any change. and worse, since now the cached > metadata isn''t consistent with the content of the disk, any write will > result in a heavily corrupted filesystem. > > better go with NFS > > -- > Javier > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- Luciano Barreto _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Another option is to use something like unison, which is a file synchronizer. http://www.cis.upenn.edu/~bcpierce/unison/ You''d have independent filesystems, but have unison synchronize (bi/multidirectionally) the files there. It works similarly to rsync but changes can happen in either direction and it allows for N-way synchronization. The only problem being that you could theoretically modify a file in multiple places. Unison will detect this and not perform an update with user intervention. Mel On Mon, Feb 14, 2011 at 12:41 PM, lucianobarreto@gmail.com <lucianobarreto@gmail.com> wrote:> Sorry if duplicated... > Thanks guys, let me expose my problem. I''m prototyping a fault tolerance > server (byzantine fault tolerance). Vms need do comunicate each order for > make decisions about requests. My host will be out of network (cant access > anything) and my Vms can comunicate to the external world, but the decision > need to be local. Yes, I could comunicate via network inside VM to exchange > information but my propose is to have a reliable local share to do it. In > another work a friend used a Virtualbox folder share to do it, but now I > need increase performance and use Xen to do it. > About clustered filesystems, any options to use it in a normal block device > like Sata HD or SCSI? I understand..."clustered"... but any option? > Thanks and I will get more information about clustered filesystems > 2011/2/14 Javier Guerra Giraldez <javier@guerrag.com> >> >> On Mon, Feb 14, 2011 at 1:37 PM, lucianobarreto@gmail.com >> <lucianobarreto@gmail.com> wrote: >> > I need to share some files between VMs. This files will be used to >> > transfer >> > some information (read/write). But I need do it without any network >> > resource >> > (NFS or others). I''ve tried to do it sharing a partition just for test >> > proposes, but i see that when i create a file on one VM another can''t >> > see it >> > and there isnt any concurrence in this approach. >> > Anyone can help me?? >> >> to share files, you need a shared filesystem. there are two main >> classes of these: >> >> - network filesystems: NFS, Samba, 9p, etc. these work really well; >> you shouldn''t reject them without good reason. >> >> - clustered filesystems: GFS, OCFS2, CXFS, etc. they''re designed for >> SAN systems where several hosts access the same storage box. in VM >> case, if you create a single partition accessible from several VMs you >> get exactly the same situation, (shared block device) and need the >> same solution. >> >> what definitely won''t work is to use a ''normal'' filesystem (ext3/4, >> XFS, ReiserFS, FAT, HPFS, NTFS, etc) on a shared partition (just like >> it won''t work in a shared block device). Since every filesystem >> aggressively caches metadata to avoid rereading the disk for every >> access, a VM won''t be ''notified'' if another one modifies a directory, >> so it won''t ''notice'' any change. and worse, since now the cached >> metadata isn''t consistent with the content of the disk, any write will >> result in a heavily corrupted filesystem. >> >> better go with NFS >> >> -- >> Javier >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users > > > > -- > Luciano Barreto > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- Melody Bliss Usenix, SAGE and LOPSA Charter Member Patron Member of the NRA _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks, ill see it. I dont need really synchronize files... just have 4 txt files that are shared in just one place, disponible to read and write.. But thanks, ill read about it too.. 2011/2/14 Melody Bliss <melodybliss@gmail.com>> Another option is to use something like unison, which is a file > synchronizer. > > http://www.cis.upenn.edu/~bcpierce/unison/ > > You''d have independent filesystems, but have unison synchronize > (bi/multidirectionally) the files there. It works similarly to rsync > but changes can happen in either direction and it allows for N-way > synchronization. > > The only problem being that you could theoretically modify a file in > multiple places. Unison will detect this and not perform an update > with user intervention. > > Mel > > On Mon, Feb 14, 2011 at 12:41 PM, lucianobarreto@gmail.com > <lucianobarreto@gmail.com> wrote: > > Sorry if duplicated... > > Thanks guys, let me expose my problem. I''m prototyping a fault tolerance > > server (byzantine fault tolerance). Vms need do comunicate each order for > > make decisions about requests. My host will be out of network (cant > access > > anything) and my Vms can comunicate to the external world, but the > decision > > need to be local. Yes, I could comunicate via network inside VM to > exchange > > information but my propose is to have a reliable local share to do it. In > > another work a friend used a Virtualbox folder share to do it, but now I > > need increase performance and use Xen to do it. > > About clustered filesystems, any options to use it in a normal block > device > > like Sata HD or SCSI? I understand..."clustered"... but any option? > > Thanks and I will get more information about clustered filesystems > > 2011/2/14 Javier Guerra Giraldez <javier@guerrag.com> > >> > >> On Mon, Feb 14, 2011 at 1:37 PM, lucianobarreto@gmail.com > >> <lucianobarreto@gmail.com> wrote: > >> > I need to share some files between VMs. This files will be used to > >> > transfer > >> > some information (read/write). But I need do it without any network > >> > resource > >> > (NFS or others). I''ve tried to do it sharing a partition just for test > >> > proposes, but i see that when i create a file on one VM another can''t > >> > see it > >> > and there isnt any concurrence in this approach. > >> > Anyone can help me?? > >> > >> to share files, you need a shared filesystem. there are two main > >> classes of these: > >> > >> - network filesystems: NFS, Samba, 9p, etc. these work really well; > >> you shouldn''t reject them without good reason. > >> > >> - clustered filesystems: GFS, OCFS2, CXFS, etc. they''re designed for > >> SAN systems where several hosts access the same storage box. in VM > >> case, if you create a single partition accessible from several VMs you > >> get exactly the same situation, (shared block device) and need the > >> same solution. > >> > >> what definitely won''t work is to use a ''normal'' filesystem (ext3/4, > >> XFS, ReiserFS, FAT, HPFS, NTFS, etc) on a shared partition (just like > >> it won''t work in a shared block device). Since every filesystem > >> aggressively caches metadata to avoid rereading the disk for every > >> access, a VM won''t be ''notified'' if another one modifies a directory, > >> so it won''t ''notice'' any change. and worse, since now the cached > >> metadata isn''t consistent with the content of the disk, any write will > >> result in a heavily corrupted filesystem. > >> > >> better go with NFS > >> > >> -- > >> Javier > >> > >> _______________________________________________ > >> Xen-users mailing list > >> Xen-users@lists.xensource.com > >> http://lists.xensource.com/xen-users > > > > > > > > -- > > Luciano Barreto > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users > > > > > > -- > Melody Bliss > Usenix, SAGE and LOPSA Charter Member > Patron Member of the NRA >-- Luciano Barreto _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Feb 15, 2011 at 3:41 AM, lucianobarreto@gmail.com <lucianobarreto@gmail.com> wrote:> Sorry if duplicated... > Thanks guys, let me expose my problem. I''m prototyping a fault tolerance > server (byzantine fault tolerance). Vms need do comunicate each order for > make decisions about requests. My host will be out of network (cant access > anything) and my Vms can comunicate to the external world, but the decision > need to be local.The first question would be "why"? Most HA-systems are designed to work whether it''s on a VM or on a physical machine. Normally you''d just use whatever mechanism you''d use on physical machine/> Yes, I could comunicate via network inside VM to exchange > information but my propose is to have a reliable local share to do it. In > another work a friend used a Virtualbox folder share to do it, but now I > need increase performance and use Xen to do it.Virtualbox shared folder has about similar performance as running nfs/samba inside dom0 and mount it on domU.> About clustered filesystems, any options to use it in a normal block device > like Sata HD or SCSI? I understand..."clustered"... but any option? > Thanks and I will get more information about clustered filesystemsYou should be able to force-assign a block device to more than one domUs with "w!" instead of just the normal "w" (e.g. phy:/dev/sda1,xvda,w!), skipping the normal you-can-only-assign-a-block-device-read-write-once check. Then you can run a cluster file system (OCFS2/GFS2/whatever) on top of it. IMHO it''s too complicated for your purpose though. Better stick to nfs/smb on dom0. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
2011/2/14 Fajar A. Nugraha <list@fajar.net>> On Tue, Feb 15, 2011 at 3:41 AM, lucianobarreto@gmail.com > <lucianobarreto@gmail.com> wrote: > > Sorry if duplicated... > > Thanks guys, let me expose my problem. I''m prototyping a fault tolerance > > server (byzantine fault tolerance). Vms need do comunicate each order for > > make decisions about requests. My host will be out of network (cant > access > > anything) and my Vms can comunicate to the external world, but the > decision > > need to be local. > > The first question would be "why"? > Most HA-systems are designed to work whether it''s on a VM or on a > physical machine. Normally you''d just use whatever mechanism you''d use > on physical machine/ > > It''s an academical model that I''m trying to propose to my master thesis. Ongeneral models physical machines or vm exchange informations over the network (point of fail, man-in-the-middle, non reliable channels), than my propose is to use another way to exchange this informations.> > Yes, I could comunicate via network inside VM to exchange > > information but my propose is to have a reliable local share to do it. In > > another work a friend used a Virtualbox folder share to do it, but now I > > need increase performance and use Xen to do it. > > Virtualbox shared folder has about similar performance as running > nfs/samba inside dom0 and mount it on domU. >Yes, i need more performance not just in exchange information, but running the VMs (my choice to Xen).> > About clustered filesystems, any options to use it in a normal block > device > > like Sata HD or SCSI? I understand..."clustered"... but any option? > > Thanks and I will get more information about clustered filesystems > > You should be able to force-assign a block device to more than one > domUs with "w!" instead of just the normal "w" (e.g. > phy:/dev/sda1,xvda,w!), skipping the normal > you-can-only-assign-a-block-device-read-write-once check. Then you can > run a cluster file system (OCFS2/GFS2/whatever) on top of it. > > I''ll try it....> IMHO it''s too complicated for your purpose though. Better stick to > nfs/smb on dom0. > > -- > Fajar >Thanks -- Luciano Barreto _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users