1

Running SerNet Samba 4.0.9 on CentOS 6.4 serving as an AD DC and fileshare for XP clients.

Added recycler per the example here.

My concern is that the recycle dir will eventually grow large. vfs_recycle's docs mention a parameter for limiting individual file sizes, but what's a best practice to prevent the bin from growing too large? Cronjob to delete old files when the total is past a certain size?

I found tmpwatch, but it's only time-based. What I'd like the system to do is keep files as long as it reasonably can, i.e., without too much space being taken up. The flip side is that I also don't want it keeping files too long if it means running out of space. Thus I'm looking for something with roughly this thinking:

  1. if bin_size < limit then quit
  2. delete oldest file in bin
  3. goto 1.

Of course there may be a more efficient algorithm, and it could be tweaked to prefer deleting bigger files unless they're past a certain age so that a big delete doesn't unnecessarily result in the pruning of a bunch of older-but-not-too-old small files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.