SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
"Solution" for the NFS related problems with rmdir
Author Message
Post "Solution" for the NFS related problems with rmdir 
Antoine Perdaens <tlg < at > denali.be>
wrote the following on Sat, 13 Dec 2003 19:44:22 +0100

I'm wondering if it is enough and why it isn't by default, the change
is made in rpath.py and consist in:

def rmdir(self):
log.Log("Removing directory " + self.path, 6)
#self.conn.os.rmdir(self.path)
try: self.conn.os.rmdir(self.path)
except os.error: shutil.rmtree(self.path)
self.data = {'type': None}

It fixes the problems I had with NFS mounted disks...

Thanks, that seems like a useful workaround. You may want to add it
as a patch to Savannah or the rdiff-backup wiki.

However, the "directory not empty" error seems to be a symptom of the
general problem that operations are happening out of order.
rdiff-backup depends on the order of operations, not just when
deleting a directory, but also to make sure things are in a consistent
state.

I just had a thought, would it work to fsync the directory? As in
something like:

def rmdir(self):
log.Log("Removing directory " + self.path, 6)
#self.conn.os.rmdir(self.path)
try: self.conn.os.rmdir(self.path)
except os.error:
self.fsync()
self.conn.os.rmdir(self.path)
self.data = {'type': None}

If that works I would check it in, because rdiff-backup should use
fsync whenever it really needs things to happen in a certain order.
(Deleting a directory is a special case, there the commands should
make it clear to the OS that things have to happen in order, so no
fsync is normally needed.)


--
Ben Escoto

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB