Jump to content
dlandon

Recycle Bin (vfs recycle) for 6.4 and later versions

599 posts in this topic Last Reply

Recommended Posts

There is a situation with the vfs_recycle module of samba that can cause a problem with the recycle bin plugin.  If you create a share with an apostrophe in it, the vfs_recycle will remove the apostrophe and replace it with an underscore and create the .Recycle.Bin on that share.  For example you define a share "Dan's Stuff" and delete a file from that share.  The vfs_recycle module will create a folder "/mnt/user/Dan_s Stuff/" and put the .Recycle.Bin there.  Unraid sees the folder and creates a new share "Dan_s Stuff".  You will then see both shares when you browse.

 

For the time being I recommend either:

- Don't create a share with an apostrophe.

- Exclude the share from the Recycle Bin.

 

There isn't anything I can do to get around this issue.  We'll just have to wait for the vfs_recycle module to be fixed.

Share this post


Link to post
3 hours ago, kurai said:

I *did* have two Chrome tabs open to different pages of the Unraid webUI.

Probably a good idea to always refresh when you switch tabs if you are going to work with multiple pages open to the same server. It is certainly possible this could cause unexpected behavior besides just this incident.

Share this post


Link to post

Wanted to ask for some advice as to what I may be doing wrong.  Have the latest plugin installed.  When I go to the recycle bin plugin I can see something like "recycle bin size 22G".  If I press the empty all trash button, nothing happens.  If I go to the shares tab, I'm able to empty the recycle bin for each share.  Am I doing something wrong or is this the way it's supposed to work?  Thanks.

Share this post


Link to post
8 minutes ago, bobrap said:

Wanted to ask for some advice as to what I may be doing wrong.  Have the latest plugin installed.  When I go to the recycle bin plugin I can see something like "recycle bin size 22G".  If I press the empty all trash button, nothing happens.  If I go to the shares tab, I'm able to empty the recycle bin for each share.  Am I doing something wrong or is this the way it's supposed to work?  Thanks.

That's not the way it is supposed to work.  Post diagnostics.

Share this post


Link to post

Any chance of a little hand holding on getting you the diagnostics?  I try to keep up with things, but, most of the time you folks are so far over my head it hurts.  If you mean the diagnostic file from unraid, I'll try and add that.    😳

tower2-diagnostics-20190208-1559.zip

Edited by bobrap

Share this post


Link to post
3 hours ago, bobrap said:

Wanted to ask for some advice as to what I may be doing wrong.  Have the latest plugin installed.  When I go to the recycle bin plugin I can see something like "recycle bin size 22G".  If I press the empty all trash button, nothing happens.  If I go to the shares tab, I'm able to empty the recycle bin for each share.  Am I doing something wrong or is this the way it's supposed to work?  Thanks.

You are using disk shares.  There was a typo in the script that removes the recycle bin contents.  I just released a fix.

Share this post


Link to post

Hi again @dlandon I had to downgrade my main server (Thor) back to 6.6.6 due to some issues i was having with dockers on my Fedora VM used for a reverse proxy,and since downgrading i get a blank screen on Recycle Bin and this in the main logs

Feb 8 23:35:04 Thor nginx: 2019/02/08 23:35:04 [error] 6729#6729: *1209407 upstream timed out (110: Connection timed out) while reading upstream, client: 10.0.0.12, server: , request: "GET /Settings/RecycleBin HTTP/2.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "myserver.unraid.net", referrer: "https://myserver.unraid.net/Settings"
Feb 8 23:35:04 Thor nginx: 2019/02/08 23:35:04 [error] 6729#6729: *1209407 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.0.0.12, server: , request: "GET /plugins/dynamix.local.master/include/LocalMaster.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "https://myserver.unraid.net", referrer: "https://myserver.unraid.net/Settings/RecycleBin"
Feb 8 23:35:04 Thor nginx: 2019/02/08 23:35:04 [error] 6729#6729: *1209407 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.0.0.12, server: , request: "POST /plugins/dynamix.system.temp/include/SystemTemp.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "https://myserver.unraid.net", referrer: "https://myserver.unraid.net/Settings/RecycleBin"

I have tried removing and re-adding the plugin.  I haven't tried restarting the server yet but will when my client load is lower than it is. Any other suggestions??

Share this post


Link to post
3 hours ago, Can0nfan said:

Hi again @dlandon I had to downgrade my main server (Thor) back to 6.6.6 due to some issues i was having with dockers on my Fedora VM used for a reverse proxy,and since downgrading i get a blank screen on Recycle Bin and this in the main logs

Feb 8 23:35:04 Thor nginx: 2019/02/08 23:35:04 [error] 6729#6729: *1209407 upstream timed out (110: Connection timed out) while reading upstream, client: 10.0.0.12, server: , request: "GET /Settings/RecycleBin HTTP/2.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "myserver.unraid.net", referrer: "https://myserver.unraid.net/Settings"
Feb 8 23:35:04 Thor nginx: 2019/02/08 23:35:04 [error] 6729#6729: *1209407 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.0.0.12, server: , request: "GET /plugins/dynamix.local.master/include/LocalMaster.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "https://myserver.unraid.net", referrer: "https://myserver.unraid.net/Settings/RecycleBin"
Feb 8 23:35:04 Thor nginx: 2019/02/08 23:35:04 [error] 6729#6729: *1209407 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.0.0.12, server: , request: "POST /plugins/dynamix.system.temp/include/SystemTemp.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "https://myserver.unraid.net", referrer: "https://myserver.unraid.net/Settings/RecycleBin"

I have tried removing and re-adding the plugin.  I haven't tried restarting the server yet but will when my client load is lower than it is. Any other suggestions??

If your recycle bin is large and your server very busy, it can take a while for the recycle bin to load.  It will eventually time out and you may see a ? Where some of the sizes should show.

 

Based on the log snippet, it looks like you may have other issues.  Post diagnostics.

Share this post


Link to post
6 hours ago, dlandon said:

If your recycle bin is large and your server very busy, it can take a while for the recycle bin to load.  It will eventually time out and you may see a ? Where some of the sizes should show.

 

Based on the log snippet, it looks like you may have other issues.  Post diagnostics.

i downgraded two of my servers both having same issue ill report that to the unraid guys the downgrade option seems to break mover among other things..

 

yeah i left it the bin was only about 30GB on Thot, Sif was having same issue

 

nginx crashed after a few minutes of waiting and i used the command line to restore the web GUI...and i noticed mover is stuck on but not actually moving anything as well as "services starting" stuck at the bottom

Share this post


Link to post

I was able to resolve by uninstalling recycle bin, deleting all the .Recycle Bin hidden directories on my shares, and rebooting the server and re-installing recyclebin, i had to reboot as unRAID was stuck in a perpetual mover (over 15 hours and no reading or writing to or from the ssd cache or array) and in my bottom status bar it was stuck on starting services....recyclebin is back and running thanks again @dlandon awesome little plugin

Share this post


Link to post
5 hours ago, Spazhead said:

hi all, just installed recycle bin, deleted some files from my share to test, nothing shows up in recycle bin

my settings are attached1764253532_Screenshot2019-02-1601_02_50.thumb.png.df9a1d4b6c4971b57e55b1ca2bbf6b64.png

looneytoon-diagnostics-20190216-0108.zip

Remove these lines from the smb-extra.conf.

[rootshare]
path = /mnt/user
comment =
browseable = yes
# Public
public = yes
writeable = yes
vfs objects =

Why are they there?  The 'vfs_objects' in particular is probably the one causing the problem.  I believe this global setting overrides the share settings, which would turn off the share recycle bin capability.

Share this post


Link to post

I've just updated the recycle bin plugin.  I've implemented a cron trash size update every minute so the recycle bin UI will be more responsive when you have a busy server with a large recycle bin.  You can turn this off if you'd like, but I recommend leaving it on.  I did not find that disks would spin up with this cron task running.

 

This will eliminate the dreaded empty page for an extended length of time on busy servers with a large recycle bin.  You may at times see a ? in the recycle bin trash size.  This indicates that the trash size determination timed out and the size could not be determined in a reasonable amount of time.  It still allows all the recycle bin functionality to operate normally.

 

When a file is deleted on a share, it may take up to a minute for the trash size to update and the file to show in the recycle bin.  Just refresh the page and the trash size and contents will eventually update.

Share this post


Link to post
On 2/16/2019 at 6:34 AM, dlandon said:

Remove these lines from the smb-extra.conf.


[rootshare]
path = /mnt/user
comment =
browseable = yes
# Public
public = yes
writeable = yes
vfs objects =

Why are they there?  The 'vfs_objects' in particular is probably the one causing the problem.  I believe this global setting overrides the share settings, which would turn off the share recycle bin capability.

 

thanks that was it, i had turn  this on to  move files from one share to another without coping and forgot to turn it back off

 

Share this post


Link to post

Just dropping in to say thanks again for maintaining this plugin, it's great to have.

 

I updated to your latest version this morning 2019.02.20 , and noticed two odd behaviors.

 

1. I had and already existing .RecycleBin folder which contained some data from a previous delete. I updated, then went and emptied the trash. I can see that the contents of the folder were purged, but to my surprise the .RecycleBin folder remained, which I found strange. Normally emptying the trash takes the folder along with it.

 

2. I deleted a folder in another area after upgrading. The folder itself was empty, but nevertheless I deleted it. This did not register with the Recycle Bin plugin, and the folder is just gone now. No worries, as I wanted it to be deleted, but also found it strange that it was not caught.

 

I am on the latest RC4 release.

Share this post


Link to post
1 hour ago, cybrnook said:

1. I had and already existing .RecycleBin folder which contained some data from a previous delete. I updated, then went and emptied the trash. I can see that the contents of the folder were purged, but to my surprise the .RecycleBin folder remained, which I found strange. Normally emptying the trash takes the folder along with it.

The .Recycle.Bin folder is no longer deleted when the trash is emptied.  Only the contents are removed.

1 hour ago, cybrnook said:

2. I deleted a folder in another area after upgrading. The folder itself was empty, but nevertheless I deleted it. This did not register with the Recycle Bin plugin, and the folder is just gone now. No worries, as I wanted it to be deleted, but also found it strange that it was not caught.

If the directory was empty, the recycle bin would not see that any files were deleted and nothing would be saved to the .Recycle.Bin folder. 

Share this post


Link to post
1 hour ago, dlandon said:

The .Recycle.Bin folder is no longer deleted when the trash is emptied.  Only the contents are removed.

I have been using a script to prevent the .Recycle.Bin folder from being deleted so that I could use it with a couple of dockers.

echo "" > /mnt/user/Media/.Recycle.Bin/placeholder.txt

Does this mean that I no longer need it?

Share this post


Link to post
26 minutes ago, wgstarks said:

I have been using a script to prevent the .Recycle.Bin folder from being deleted so that I could use it with a couple of dockers.


echo "" > /mnt/user/Media/.Recycle.Bin/placeholder.txt

Does this mean that I no longer need it?

Yes.

Share this post


Link to post

The old way of doing things was to find empty .Recycle.Bin directories on the array mount points directly using a find with a wild card to search and delete the folder from the user shares.  I never liked this because of the potential of things going wrong and removing things that shouldn't be removed.  I do recycle bin operations on a mount point with symlinks to the array and UD .Recycle.Bin folders at /mnt/RecycleBin/.  This was created initially for proper file browsing, but now all operations are on this mount point.  This will provide at least a little protection if things go awry.

 

The one thing that has come from this is that the share .Recycle.Bin folder will remain after the first file has been deleted from a share.

 

Clicking on the Trash Can icon will show the shares with empty .Recycle.Bin folders, but the 'Shares' tab will only show a share with recycle bin contents.

 

With the addition of the 'Shares' tab and being able to browse the shares individually, I am considering removing the Trash Can icon browse.  It is more cumbersome to use and really doesn't offer anything that can't be done in the 'Shares' tab.

Share this post


Link to post

I haven't heard any feedback yet from the latest changes to the recycle bin, but I am pleased with the responsiveness of the web page now.  I hated the blank white screen when the server was busy and/or there was a large recycle bin.  The web page is now very quick to load and if the cron trash size script takes a long time to get the trash sizes, it will only show a '?' for the trash size and not hang the web page.  Another advantage is that because the trash size is done every minute, the file references are cached and the disks don't spin up when looking at the recycle bin web page.

Share this post


Link to post
On 2/21/2019 at 11:40 AM, dlandon said:

I haven't heard any feedback yet from the latest changes to the recycle bin

I haven't noticed any issues, and I love how fast the page loads.  Thank you!

Share this post


Link to post

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.