Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Recycle Bin (vfs recycle) for SMB Shares

Featured Replies

  • Author
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

 

  • Replies 1.3k
  • Views 396.7k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Shares were not displaying when "Log Deleted Files" was set to "No".  This has been fixed in the latest version.

  • dlandon
    dlandon

    Done.   The file directory in the recycle bin is created when the file is deleted so it will show the date/time when the file(s) were deleted, but the modify date/time on the files will rema

  • The excluded files input field in the settings is now 150 characters.

Posted Images

2 hours ago, dlandon said:

 

Show the output of this command:

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

 

Nothing is output when I run that command. 

  • Author
8 hours ago, JimJamUrUnraid said:

Nothing is output when I run that command. 

Ok, that shows that there are no deleted files being logged.

 

Show the output of this command:

cat /var/log/samba/log.smbd

This will show if any logging is done at all.

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

2 hours ago, dlandon said:

Ok, that shows that there are no deleted files being logged.

 

Show the output of this command:

cat /var/log/samba/log.smbd

This will show if any logging is done at all.

I have attached the output for the above command. I don't see anything pertaining to recycle bin, but it is logging somethings.

unraid.txt

  • Author
On 4/12/2022 at 8:53 AM, JimJamUrUnraid said:

I have attached the output for the above command. I don't see anything pertaining to recycle bin, but it is logging somethings.

unraid.txt 7.07 kB · 1 download

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.

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

  • Author
25 minutes ago, JimJamUrUnraid said:

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

Sounds like the background task that gets the share sizes might have stopped working.  Maybe the logging will work now.

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.

  • Author
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.

  • Author
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.

  • Author

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.

On 4/23/2022 at 3:43 PM, dlandon said:

It will now catch up and purge aged files properly

 

Thanks for update , now working fine and delete all cron files on the nextday after 4x24 for me.

  • 3 weeks later...

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.

  • Author
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.

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

  • Author
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.

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!

  • Author
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.

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?

  • Author
1 hour ago, sluggathor said:

is the performance any different when using the ud rootshare, since it chains cifs mounts?

It doesn't chain CIFS mounts.

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

  • Author
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.

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?

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.