helpdavfs2 - Support: sr #107864, davfs2 does not clear the cache

 
 

sr #107864: davfs2 does not clear the cache

Submitted by:  Hans Schulz <hschulz>
Submitted on:  Sat 05 Nov 2011 08:14:31 AM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 5 - BlockerStatus: Need Info
Privacy: PublicAssigned to: Werner Baumann <wbaumann>
Open/Closed: ClosedOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 12 Nov 2011 12:03:39 PM UTC, comment #2:

Thanks for your reply, very useful since I was able to look in the right direction now!
I had already checked that a single file was correctly being uploaded to the server although I noticed that it took very long and it used a lot of network resources, which puzzled me a bit.

I started to turn on only debug cache and the syslog reported that the cache size was exceeded. I increased the cache from 5 MiB to 50000 MiB. So now I have to wait and see whether this solved the issue.

BTW: I make backups using duplicity, which creates its own manifests etc. in a local cache. Based on the local manifests duplicity produces encrypted .gz archives that are then transferred to the remote server. So there is no timestamp checking directly with files on the remote server.

Thanks again and I'll keep you posted
cheers
hans

Hans Schulz <hschulz>
Sun 06 Nov 2011 07:10:33 PM UTC, comment #1:

No davfs2 does not clear the cache at umount. The files stay in cache to avoid downloading of unchanged files when it is mounted again.
davfs2 will delete files in the cache when the cache size exceeds the configured maximum size. But it will never delete files that are open or that have been changed localy and not yet been uploaded to the server.
When files are generated or changed locally, davfs2 will upload them to the server some seconds after they are closed. If the upload is successful it will not try to upload it again as long as the file is unchanged.

When the cache is ever growing this usually means, that uploading to the server does not work. Please check wether the files you created or changed locally are really uploaded to the server.

You mentioned backup scripts. If these scripts rely on time stamps there may be a problem. Because uploads to the server are done asynchronously the time stamps on the server side may be different form the time stamps davfs2 stores locally. This is not aproblem as long as the file system is mounted and for files that are kept it is not even a problem after umount and mout. But for files that are not kept in the cacche davfs2 will take the time stamps from the server when the file system is mounted. This time stamp will in many cases be newer than what you sow when it was mounted the last time.

You can savely remove the the cache when the file system is not mounted. The cache directory contains subdirectories for each davrfs2 file system. You can easily recognize it by the name. Just remove the complete subdirectory with all its files. When the file system is mounted the next time davfs2 will build a new cache directory.

If none of the above helps to solve the issue, please do this:
- remove the cache subdirectory
- add option 'debug most'
- mount the file system
- create just one small file
- unmount the file system
- create a copy of the file 'index' in the cache subdirectory
- mount again
- wait about 20 seconds
- unmount
- search for the debug logs in your log file
- send the debug log and the index file
- report any error messages you may get in full length

Cheers
Werner

Werner Baumann <wbaumann>
Project AdministratorIn charge of this item.
Sat 05 Nov 2011 08:14:31 AM UTC, original submission:

When I installed my new linux box, using the AMD64 version of Ubuntu 11.04, I copied my davfs.conf (attached) and backup scripts from the old box, with no changes. On the new box I noticed that files are incrementally written to /var/cache/davfs/<my webdav mount> but not deleted after a succesful umount. Result is that the next time I mount and then umount the remote webdav server, the entire - ever growing - contents of the cache are again written to the webdav server, taking tens of hours now for a umount to complete.

What could cause this?

Hans Schulz <hschulz>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #24304:  davfs2.conf added by hschulz (2kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wbaumann (Posted a comment)
  • -unavailable- added by hschulz (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 20 Apr 2014 06:01:43 PM UTCwbaumannOpen/ClosedOpen=>Closed
    Sun 06 Nov 2011 07:10:33 PM UTCwbaumannStatusNone=>Need Info
      Assigned toNone=>wbaumann
    Sat 05 Nov 2011 08:14:31 AM UTChschulzAttached File-=>Added davfs2.conf, #24304

    Back to the top


    Powered by Savane 3.1-cleanup