maindavfs2 - Support: sr #108808, Can I have davfs discard files if...

 
 

sr #108808: Can I have davfs discard files if they exceed cache

Submitter:  None
Submitted:  Sat 25 Apr 2015 01:35:41 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  _71007
Originator Email:  -email is unavailable- Open/Closed:  Closed
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 26 Apr 2015 04:18:11 PM UTC, comment #3: 

It would be better to fix the source of the problem than to regularly remove the garbage.

Werner

- <_71007>
Sat 25 Apr 2015 06:29:46 PM UTC, comment #2: 

This is a system uploading (saving to davfs) images from a security camera. And I care more about the integrity of the whole system (e.g. not having the disk fill up) then about saving each individual file image.

I guess the best thing to do in my case would be to rm -rf the lost+found from a cronjob, every hour or so - or something similar.

Anonymous
Sat 25 Apr 2015 04:32:01 PM UTC, comment #1: 

If the size of the files in the cache exceeds the value of option cache_size (default 50 MiB) then davfs2 will automatically delete files. No action needed.

But there are some files that davfs2 will not delete, independent of the cache size. These are

  • open files. Due to the nature of the WebDAV protocol davfs2 needs a local copy of all open files.
  • files that have been changed locally and are not yet uploaded to the server. Deleting these files would mean to destroy all the work you have put into changing these files.


"Can I have davfs discard files if it cannot upload them"
Why would you want to do this. This only concerns files that you changed, probably by intention.

When there are a lot of files that davfs2 can't upload, then there is something wrong with the connection to the server.

There are two cases:

  • davfs2 can't upoad the file, but the error seems to be temporary. davfs2 will hold the file in the cache and try uploading again and again.
  • The error seems to be permanent. davfs2 will move the file into the lost+found directory. You can delete them there but they contain your changes that are not on the server.


If you have files in lost+and found you need to find and fix the problem.

  • Add option 'debug most' to the davfs2.conf file.
  • Mount the file system.
  • Copy one small file into your davfs2 file system.
  • Wait 20 seconds.
  • Unmount the file system.
  • Search your log files for messages from mount.davfs and send them here.


Werner

P.S.:
If you really want to delete the files in the cache, you can do this. The file system must not be mounted. Delete the whole cache directory of davfs2. It is either ~/.davfs2/cache or /var/cache/davfs2

- <_71007>
Sat 25 Apr 2015 01:35:41 PM UTC, original submission:  

Can I have davfs discard files if it cannot upload them and the cache size has already been exceeded?

I'm running it on a low-spec computer and seems unreasonable to not have an option where I tell the software to not exceed certain hard limits.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by _71007 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-15 _71007 Open/ClosedOpen Closed
    2015-04-26 _71007 StatusIn Progress Done
    2015-04-25 _71007 StatusNone In Progress
        Assigned toNone _71007

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code