[Gluster-users] Sharing home directories between two symetric nodes?

Amos Shapira amos.shapira at gmail.com
Sun Aug 3 11:09:49 UTC 2008


2008/8/1 Keith Freedman <freedman at freeformit.com>:
> I think you have it right.
> it's an interesting way to use gluster..  you run a risk on occasion,
> however.
>
> if you happen to update files on both ends while they're disconnected, then
> once you're re-connected, when you access the same file, you can not be sure
> which version will prevail.

Yes, I think I'm aware of the general gotachas with multi-node
writers. The mitigating factors in my setup (I hope) are:

1. These are desktop machines which are always connected via a wired
network - so whenever both are turned on they can sync up (i.e. it's
not like one of them is a laptop).
2. Me and my wife use separate accounts so I suppose most of the time
we won't be working on the same files anyway.

I envision it generally that both of us will be able to login to each
of our logins on each machine and just have the files around, while
still allowing me to just upload files from the camera to my desktop
and tell my wife that she can access the photos from hers right away
(and also have a backup in the process).

>
> (you can, but it's difficult to know--as I understand it, gluster tracks a
> timestamp and a revision number--somehow it uses these to decide which file
> is "newer")
>
> Also, gluster doesn't to automatic healing--meaning, when you reconnect it
> doesn't immediately push the updates to the other side.. this is done only
> when files are accessed.  So, if you make file changes while disconnected,
> and then reconnect.. change some OTHER files, then disconnect again, you may
> still have an older version of the original file

Thanks. That's a point I missed from the little of the docs I read so far.

What's defined as "sufficient access"? Is a stat(2) on the file enough
to cause the data push or does it actaully have to be open(2)'ed or
does it even actually have to be completely read(2)?

Maybe a simple "find ... -size..." on the shared tree during boot
could trigger a full sync?

Thanks,

--Amos




More information about the Gluster-users mailing list