Re: DirectoryStorage on NFS?
Toby Dickenson <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb.dirstorage |
|---|---|
| Message-ID | <[email protected]> |
On Thursday 04 Nov 2004 00:59, J C Lawrence wrote:
> Will DirectoryStorage run correctly in a situation where the database is
> on an NFS mountpoint?
I dont see why it shouldnt work, but Im happy to admit to being an NFS novice.
> File "/usr/local/lib/python2.3/DirectoryStorage/PosixFilesystem.py", line
> 43, in sync_directory fsync(f)
> OSError: [Errno 22] Invalid argument
The problem occured trying to fsync a directory. Is that not supported on NFS?
I *think* all directory operations are synchronous on NFS, so it should be
safe without that operation. Try this patch for now. If it works out we can
create a configuration file option.
Index: PosixFilesystem.py
===================================================================
RCS file: /cvsroot/dirstorage/DirectoryStorage/PosixFilesystem.py,v
retrieving revision 1.24
diff -C1 -r1.24 PosixFilesystem.py
*** PosixFilesystem.py 3 Aug 2004 20:56:16 -0000 1.24
--- PosixFilesystem.py 4 Nov 2004 08:27:16 -0000
***************
*** 35,37 ****
def sync_directory(self,dir):
! if self.use_sync:
p = os.path.join(self.dirname,dir)
--- 35,37 ----
def sync_directory(self,dir):
! if 0: # not on NFS
p = os.path.join(self.dirname,dir)
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click