Recycle Bin (vfs recycle) for SMB Shares


dlandon

Recommended Posts

38 minutes ago, JimJamUrUnraid said:

Here is my diganostics. I don't see any deleted files in the log, but I have deleted files in the .Recycle.Bin folder, and I have deleted files recently that show in the .Recycle.Bin folder.

 

Show the output of this command:

cat /var/log/samba/log.smbd | grep unlink

 

Link to comment

I can't update this plugin on one of my unraid boxes, I removed it and now also can't install, the error I get is: 

plugin: run failed: /bin/bash retval: 2

 Looks similar, if I run "du -x / | sort -n" the output is attached.

 

The top is cut off but I think the lower the number the less useful in this case.  I don't want to buy more RAM, or even temporarily shuffle RAM around.

 

2nd Edit: I was able to install and update the plugin through Main Plugins Page -> Install Plugin -> Config Folder -> Plugins.Removed -> recycle.bin.plg, and then was able to update normally.

du.txt

Edited by bobobeastie
solved issue
Link to comment
3 hours ago, dlandon said:

That log is for all samba operations including the recycle bin.  Recycle bin file deletes are not being logged, but I don't see anything wrong in your setup.

What about how the setting page for the recycle bin doesn't show any thing in the recycle bins across all my shares? It used to show the total space consumed by recycle bins and allow me to empty them... Have those features been taken away?

 

I rebooted the server to do some maintenance and now it is working...

Edited by JimJamUrUnraid
Link to comment
7 hours ago, MayaYa said:

Hey,

 

With the "Excluded Directories" feature it only works with

'sharename/folder' and not with 'sharename/folder/subfolder' 

or at least I don't seem to be able to get it to work. This would be a great feature to have.

Looks like I don't set up the directory to exclude properly when it's a sub-directory.  Looking into it now.

Link to comment
13 hours ago, MayaYa said:

Hey,

 

With the "Excluded Directories" feature it only works with

'sharename/folder' and not with 'sharename/folder/subfolder' 

or at least I don't seem to be able to get it to work. This would be a great feature to have.

Fix in the next release.

Link to comment

New release.  Over the last few weeks I have been tracking down a problem where the cron purge of aged files has been failing.  I tracked it down to the trashsizes cron and the purge cron both running at the exact time on the hour and conflicting with each other.  I've sorted it out, so it works now.  This mostly showed up with large recycle bin contents.

 

After upgrading and the cron purge removing aged files, you may see a significant decrease in the size of your Recycle Bin contents.  This will happen if the cron purge of aged files has been failing.  It will now catch up and purge aged files properly.  It is nothing to be concerned about as it is only the aged files being purged catching up.

  • Like 1
  • Thanks 1
Link to comment
  • 3 weeks later...
31 minutes ago, xtrips said:

Lately the recycle bin stopped refreshing instantly after emptying. It still shows the deleted data amount for a while. Before that I got used to get a feedback of 0 data in the bin immediately.
Not critical but I thought you should know.

The latest changes I made changed the way that works.  If you have the refresh the recycle bin in the background set, the recycle bin is not cleared right away.  It will clear on the next refresh of the recycle bin sizes.  If you set to not refresh in the background, the recycle bin will clear immediately.

  • Thanks 1
Link to comment
4 hours ago, Norcunas said:

Idea for enhancement:
Make it a compressed folder of some sort to save some space

I don't think there is a way to do that since the vfs_recycle finctionality is built into samba and it doesn't support compression.

Link to comment
1 hour ago, sluggathor said:

Hi,

can someone confirm, that the recycle bin is now working with the rootshare setting? and if so which rootshare type do we have to use (UD vs samba extra config)?

 

thanks for you work!

You need to use the UD rootshare for the recycle bin to work.

Link to comment

right now i am using a symlink from one of the cache drives (a seperate one just for appdata). it points to /mnt/user and works well enough (even with recyclebin). the only downside i can see so far is a folder called 'root' (name of the symlink/share) that sits in the rootshare and points in a loop to the same folder :D. i set the cache policy for it to no and it falls back to the individual cache settings of the underlying shares respectively. is the performance any different when using the ud rootshare, since it chains cifs mounts?

Link to comment

then i misread the situation. i thought because of the way it displays, that it mounts a share and then shares it. the warning says it can not be guaranteed that files end up on the correct drives. is that an edge case or something that can be avoided?

thanks for all the info

Link to comment
Just now, sluggathor said:

then i misread the situation. i thought because of the way it displays, that it mounts a share and then shares it. the warning says it can not be guaranteed that files end up on the correct drives. is that an edge case or something that can be avoided?

thanks for all the info

It mounts either /mnt/user/ or /mnt/user0/ (selectable) and shares that mount and applies the recycle bin parameters to the rootshare.  All the 'shares' work the same as they do separately.

 

The warniing applies to the UD rootshare and is the same if you use the smb-extra.conf configuration.  It's the way files are allocated to shares.

Link to comment
7 hours ago, dlandon said:

It mounts either /mnt/user/ or /mnt/user0/ (selectable) and shares that mount and applies the recycle bin parameters to the rootshare.  All the 'shares' work the same as they do separately.

 

The warniing applies to the UD rootshare and is the same if you use the smb-extra.conf configuration.  It's the way files are allocated to shares.

Thank you for the explanation. Just one more thing: Is there a way to control access to the ud rootshare? like user-management?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.