|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] shared HD
andre@xxxxxxxxxxxxxxxx wrote:
I have 2 domU running. On both domU I have 1 HD for that machine
only and another second one shared between those 2, wich means I
have 3 virtualized HD on total and the third shared HD is currently
on RAM memory(I know, turning off would lose data and all those
stuff. I have taken care of that alread). Also, on both machines I
did chmod 777 -R mountPoint. I can see files created by the other
machine on that HD if I umount and mount again, I can also open and
edit it, but if I edit an existing file or creat a new one, the
changes only take effect on the other machine if I umount and mount
again on that machine. Is there any way to changes take effect
without doind umount and mount?
Yes, you **MUST** use a cluster filesystem. If you mount a regular
filesystem on two machine at once, as it sounds like you're doing
here, then you are **guaranteed* to corrupt the filesystem.
What is happening is that each guest is using filesystem drivers
written on the assumption that they have sole use of the device. This
means :
a) When one guest makes a change, it will not necessarily write those
changes to disk immediately.
2) Neither guest will check that the data on disk hasn't changed
before making it's own changes. In particular, each guest will be
caching a significant quantity of metadata.
Consider this simple scenario :
A creates a new file on disk. It consults the cached data in memory
to determine what parts of the disk and directory are free to store
the data and the file's directory entry.
B does the same thing, using it's cached copy.
A writes it's data to disk.
B writes it's data to disk.
The chances of B not overwriting something just written by A are
exceedingly slim. Neither A nor B will know about the changes made by
the other - so they may well chose the same bit of disk in which to
store the file.
The result is almost certain to be a filesystem corrupted to the
extent that the only cure is to wipe it and start again.
Cluster filesystems work differently. Because they are written on the
basis of multiple devices able to write to the same device, they are
designed with the appropriate locks and communications to allow the
machines to co-operate.
Alternatively , use a network filesystem (eg NFS or SMB) for the shared data.
--
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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|