Recycle Bin (vfs recycle) for SMB Shares


dlandon

Recommended Posts

10 minutes ago, sluggathor said:

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

This is really a discussion for the UD forum, not recycle bin.  In UD Settings, you control access to UD devices.

Link to comment
On 5/19/2022 at 2:10 PM, dlandon said:

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.


I have the update recycle bin in the background set as yes and noticed that if you manually navigate to the shares tab then delete the files from there instead of the main settings page the size is still updated almost instantly. 

 

I'm guessing the two locations to empty the recycle bin are handled differently in regards to the listed size? Any intention to bring the shares tab into that same approach?

Link to comment
21 hours ago, jaybird2203 said:

I'm guessing the two locations to empty the recycle bin are handled differently in regards to the listed size? Any intention to bring the shares tab into that same approach?

Does it bother you that much?

 

When you delete a file, the recycle bin space could take up to 5 minutes to update.  Same issue.

Link to comment

Nope, doesn't bother me in the slightest.

Was simply thinking if other users were looking for that instant gratification of deleting and getting an immediate update on size they could use that approach of navigating to the share tab until both had the same functionality implemented.

Sent from my SM-G975W using Tapatalk

Link to comment
Just now, jaybird2203 said:

Nope, doesn't bother me in the slightest.

Was simply thinking if other users were looking for that instant gratification of deleting and getting an immediate update on size they could use that approach of navigating to the share tab until both had the same functionality implemented.

Sent from my SM-G975W using Tapatalk
 

The reason this was done is because updating the whole recycle bin can take a lot of time with a large recycle bin.  This would cause the GUI to hang while it is refreshing the recycle bin.  That's why the background update was inplemented so the GUI would not appear to hang.

 

If someone wants immediate gratification, they can turn off the background update, with the understanding an update could take a long time and hang the GUI.

  • Like 1
Link to comment
  • 3 weeks later...

I am in the process of consolidating my array onto larger disks.  The new disks are currently mounted in UD, and I am rsync copying the data.  When the copies are complete, the I will make them the array disks, and build parity.

 

On one of the shares, I would like to preserve the recycle bin, with its contents intact.  If I rsync the .Recycle.Bin folder within the share, will I retain full recycle bin functionality after the new array is brought online?
 

Link to comment
4 minutes ago, aim60 said:

I am in the process of consolidating my array onto larger disks.  The new disks are currently mounted in UD, and I am rsync copying the data.  When the copies are complete, the I will make them the array disks, and build parity.

 

On one of the shares, I would like to preserve the recycle bin, with its contents intact.  If I rsync the .Recycle.Bin folder within the share, will I retain full recycle bin functionality after the new array is brought online?
 

Yes, it will remain intact if you preserve the share contents.

  • Like 1
Link to comment
  • 3 months later...

Hello, 

I am running into an issue with SMB shares on my server that seems to be caused by the recycle bin plugin. Whenever I have it running I experience issues moving folders around within the share when accessing them from Windows via mapped drive or UNC path. Windows gives me a generic "folder in use" error message that stops when I stop recycle bin. Any idea what might be causing this? 

Link to comment
1 hour ago, bsherman said:

Hello, 

I am running into an issue with SMB shares on my server that seems to be caused by the recycle bin plugin. Whenever I have it running I experience issues moving folders around within the share when accessing them from Windows via mapped drive or UNC path. Windows gives me a generic "folder in use" error message that stops when I stop recycle bin. Any idea what might be causing this? 

I've not heard of anyone having this issue.  Post your diagnostics so I can have a look.

Link to comment
4 hours ago, dlandon said:

Nothing obvious.  Where were you moving folders around?


In the media share. Copied from my PC, then from there I move them into the correct folders as needed. Yesterday I reproduced the issue while recycle bin was stopped, but oddly enough starting it allowed me to then move the folder. It seems like just changing the status of the recycle bin plugin unlocks the folder. Very strange. 

Link to comment
23 minutes ago, bsherman said:


In the media share. Copied from my PC, then from there I move them into the correct folders as needed. Yesterday I reproduced the issue while recycle bin was stopped, but oddly enough starting it allowed me to then move the folder. It seems like just changing the status of the recycle bin plugin unlocks the folder. Very strange. 

I suspect there is a Samba issue that restarting the Recycle Bin clears up because when the Recycle Bin is started, it restarts Samba.

Link to comment
  • 4 weeks later...

My plugin was just updated to recycle.bin-2022.10.21.tgz and this morning I noticed my log was full of below messages.  I stopped the plugin for now.  attaching diagnostics

 

Oct 25 10:49:06 Debo-Server smbd_audit[21059]: close fd 70 
Oct 25 10:49:06 Debo-Server smbd_audit[21059]: close fd 69 
Oct 25 10:49:06 Debo-Server smbd_audit[21059]: close fd 68 
Oct 25 10:49:06 Debo-Server smbd_audit[21059]: close fd 67 
Oct 25 10:49:06 Debo-Server smbd_audit[21059]: close fd 66 
Oct 25 10:49:06 Debo-Server smbd_audit[21059]: close fd 65 
Oct 25 10:49:06 Debo-Server smbd_audit[21059]: close fd 64 
Oct 25 10:49:06 Debo-Server smbd_audit[21059]: close fd 63 
Oct 25 10:49:06 Debo-Server smbd_audit[21059]: close fd 62 
Oct 25 10:49:06 Debo-Server smbd_audit[21059]: close fd 61 
Oct 25 10:49:06 Debo-Server smbd_audit[21059]: close fd 60 

 

Here are the relevant lines from the syslog from Auto Update recycling.bin.plg

 

Oct 25 00:00:01 Debo-Server Plugin Auto Update: Checking for available plugin updates
Oct 25 00:00:01 Debo-Server Recycle Bin: Scheduled: Files older than 3 days have been removed
Oct 25 00:00:04 Debo-Server Plugin Auto Update: Auto Updating recycle.bin.plg
Oct 25 00:00:04 Debo-Server root: plugin: creating: /boot/config/plugins/recycle.bin/recycle.bin-2022.10.21.tgz - downloading from URL https://raw.githubusercontent.com/dlandon/recycle.bin/master/recycle.bin-2022.10.21.tgz
Oct 25 00:00:04 Debo-Server root: plugin: checking: /boot/config/plugins/recycle.bin/recycle.bin-2022.10.21.tgz - MD5
Oct 25 00:00:04 Debo-Server root: plugin: skipping: /tmp/recycle.bin/wait_recycle.bin already exists
Oct 25 00:00:04 Debo-Server root: plugin: setting: /tmp/recycle.bin/wait_recycle.bin - mode to 0770
Oct 25 00:00:04 Debo-Server root: plugin: skipping: /tmp/recycle.bin/remove-smb-extra already exists
Oct 25 00:00:04 Debo-Server root: plugin: setting: /tmp/recycle.bin/remove-smb-extra - mode to 0770
Oct 25 00:00:04 Debo-Server root: plugin: running: anonymous
Oct 25 00:00:04 Debo-Server Recycle Bin: Stopping Recycle Bin
Oct 25 00:00:05 Debo-Server root: plugin: running: anonymous
Oct 25 00:00:05 Debo-Server root: plugin: skipping: /boot/config/plugins/recycle.bin/recycle.bin.cfg already exists
Oct 25 00:00:05 Debo-Server root: plugin: running: anonymous
### [PREVIOUS LINE REPEATED 1 TIMES] ###
Oct 25 00:00:05 Debo-Server Recycle Bin: Starting Recycle Bin
Oct 25 00:00:07 Debo-Server Plugin Auto Update: Checking for language updates
Oct 25 00:00:07 Debo-Server Plugin Auto Update: Community Applications Plugin Auto Update finished
Oct 25 00:00:07 Debo-Server rsyslogd: [origin software="rsyslogd" swVersion="8.2102.0" x-pid="9643" x-info="https://www.rsyslog.com"] start
Oct 25 00:00:08 Debo-Server smbd[9774]: [2022/10/25 00:00:08.068540,  0] ../../source3/smbd/server.c:1734(main)
Oct 25 00:00:08 Debo-Server smbd[9774]:   smbd version 4.15.7 started.
Oct 25 00:00:08 Debo-Server smbd[9774]:   Copyright Andrew Tridgell and the Samba Team 1992-2021
Oct 25 00:00:08 Debo-Server nmbd[9782]: [2022/10/25 00:00:08.086239,  0] ../../source3/nmbd/nmbd.c:901(main)
Oct 25 00:00:08 Debo-Server nmbd[9782]:   nmbd version 4.15.7 started.
Oct 25 00:00:08 Debo-Server nmbd[9782]:   Copyright Andrew Tridgell and the Samba Team 1992-2021
Oct 25 00:00:08 Debo-Server wsdd2[9798]: starting.
Oct 25 00:00:08 Debo-Server winbindd[9799]: [2022/10/25 00:00:08.164908,  0] ../../source3/winbindd/winbindd.c:1722(main)
Oct 25 00:00:08 Debo-Server winbindd[9799]:   winbindd version 4.15.7 started.
Oct 25 00:00:08 Debo-Server winbindd[9799]:   Copyright Andrew Tridgell and the Samba Team 1992-2021
Oct 25 00:00:08 Debo-Server winbindd[9801]: [2022/10/25 00:00:08.168073,  0] ../../source3/winbindd/winbindd_cache.c:3085(initialize_winbindd_cache)
Oct 25 00:00:08 Debo-Server winbindd[9801]:   initialize_winbindd_cache: clearing cache and re-creating with version number 2
Oct 25 00:00:08 Debo-Server smbd_audit[9923]: connect to service Pictures by user debo
Oct 25 00:00:08 Debo-Server smbd_audit[9923]: openat ./. (fd 43) 
Oct 25 00:00:08 Debo-Server smbd_audit[9923]: openat ./. (fd 44) 
Oct 25 00:00:08 Debo-Server smbd_audit[9923]: close fd 44 
Oct 25 00:00:08 Debo-Server smbd_audit[9923]: openat ./. (fd 44) 
Oct 25 00:00:08 Debo-Server smbd_audit[9923]: openat ./. (fd 45) 

debo-server-diagnostics-20221025-1100.zip

Edited by B_Sinn3d
added syslog excerpt
Link to comment

The issue with all the log messages, is we made changes for 6.11 so we could remove the recycle bin entries in the smb-extra.conf file.  The problem is the logging mechanism is different on 6.10 and below.  The latest recycle bin version did not keep the settings for 6.10.  They are now restored.

 

Update to the latest version and this should be fixed.

  • Thanks 1
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.