On Monday 15 December 2008 16:33:16 john Moylan wrote:
> Thanks Ronan, I'll run some tests. I think I can live with slightly
> asynchronous reads/writes.
That's not all you're going to get. Consider what happens if server1 deletes
a file, and then writes a lot of data to the filesystem. Since the file was
deleted, the pointers to its block list is now free space, and can be
reallocated for data.
On server2, you read the deleted file and pick up not pointers to
previously-used blocks on a ext3 filesystem, but some other data, looking
like pointers to who knows where. Who knows what you will find there. You
can look forward to "read beyond end of device", totally weird data
corruption and the odd kernel panic (if you happen to hit a filesystem bug).
For application errors, consider what may happen when you read a corrupt
directory ...
There is no reason for the kernel on server2 to discard blocks it has
reliably read from the device. These blocks will sit in the cache until the
memory is required for some other purpose. Over time, the likelihood of out
of date information increases. (To see the amount of cached information, you
can compare the output of "free" before and after
echo "1" > /proc/sys/vm/drop_caches )
You can use ext3 if you mount *both* sides as read-only.
>> J
>> 2008/12/15 Ronan Mullally <ronan at iol.ie>:
> > On Mon, 15 Dec 2008, john Moylan wrote:
> >> On Server1 I have configured an LVM2 LV on the LUN with an EXT3
> >> flesystem.
> >>
> >> On Server2 I have mounted the same LUN as readonly.
> >>
> >> I'm exporting NFS4 from both servers as Readonly.
> >>
> >> Is there any reason why I should be using CLVM or GFS2 in this sort of
> >> situation? Instead of plain LVM2 and EXT3?
> >>
> >> Everything looks like it's working and I can't see any reason why it
> >> should not work? Server2 cannot access any files or write any LVM meta
> >> data to the LUN because it has Read only access.
> >
> > The above suggests that Server1 has write access to the filesystem. What
> > happens when Server1 writes something to the filesystem? Until the data
> > is actually written to disk you're going to have a window where an NFS
> > read request to Server1 will return different results to an NFS read
> > request to Server2. How large that window is depends on how long the
> > kernel takes to commit changes in the write cache.
> >
> >
> > -Ronan
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!