Recycle Bin (vfs recycle) for SMB Shares


dlandon

Recommended Posts

12 minutes ago, tucansam said:

Anytime I try to stop my server, it hangs at "Stopping Recycle Bin" in the bottom line of the web GUI, where information is displayed.  Only thing that works at that point is a 'reboot' issued from the shell, which of course then spawns a parity check.

Stop the recycle bin, then try to stop the server.  I don't think the recycle bin is hanging, it's probably the last message displayed before it hangs.

Link to comment
1 hour ago, 1812 said:

any reason it takes nearly 5 minutes to load?

 


eb 25 17:55:21 Brahms1 emhttpd: Starting Recycle Bin...
Feb 25 17:59:16 Brahms1 unassigned.devices: Mounting 'Auto Mount' Devices...

or is it taking nearly 5 minutes to start mounting the devices via unassigned drives??

Those are both on the disks_mounted event.  The recycle bin should not take that long.  There may be a lot of other things loading on the disks_mounted event and could be slowing things down between the recycle bin and UD, along with the normal start up stuff.

 

Here is a snippet from my log.  There is not that much time between the events.

Feb 25 19:28:52 MediaServer Recycle Bin: Starting Recycle Bin
Feb 25 19:28:52 MediaServer emhttpd: Starting Recycle Bin...
Feb 25 19:28:52 MediaServer rsyslogd:  [origin software="rsyslogd" swVersion="8.40.0" x-pid="4941" x-info="https://www.rsyslog.com"] start
Feb 25 19:28:53 MediaServer ntpd[1692]: Listen normally on 5 br0 192.168.1.3:123
Feb 25 19:28:53 MediaServer ntpd[1692]: Listen normally on 6 br0 [2605:a000:1317:86ba::1282]:123
Feb 25 19:28:53 MediaServer ntpd[1692]: Listen normally on 7 br0 [fe80::acbb:b8ff:fef8:5623%13]:123
Feb 25 19:28:53 MediaServer ntpd[1692]: new interface(s) found: waking up resolver
Feb 25 19:29:13 MediaServer unassigned.devices: Mounting 'Auto Mount' Devices...

It looks like some network stuff is happening in my case.  Post your diagnostics and I'll have a look.

Link to comment
14 minutes ago, dlandon said:

Those are both on the disks_mounted event.  The recycle bin should not take that long.  There may be a lot of other things loading on the disks_mounted event and could be slowing things down between the recycle bin and UD, along with the normal start up stuff.

 

Here is a snippet from my log.  There is not that much time between the events.


Feb 25 19:28:52 MediaServer Recycle Bin: Starting Recycle Bin
Feb 25 19:28:52 MediaServer emhttpd: Starting Recycle Bin...
Feb 25 19:28:52 MediaServer rsyslogd:  [origin software="rsyslogd" swVersion="8.40.0" x-pid="4941" x-info="https://www.rsyslog.com"] start
Feb 25 19:28:53 MediaServer ntpd[1692]: Listen normally on 5 br0 192.168.1.3:123
Feb 25 19:28:53 MediaServer ntpd[1692]: Listen normally on 6 br0 [2605:a000:1317:86ba::1282]:123
Feb 25 19:28:53 MediaServer ntpd[1692]: Listen normally on 7 br0 [fe80::acbb:b8ff:fef8:5623%13]:123
Feb 25 19:28:53 MediaServer ntpd[1692]: new interface(s) found: waking up resolver
Feb 25 19:29:13 MediaServer unassigned.devices: Mounting 'Auto Mount' Devices...

It looks like some network stuff is happening in my case.  Post your diagnostics and I'll have a look.

I actually deleted and reinstalled. If it happens again I’ll post diags but my last uptime was 50 something days so it could be a while...

Link to comment
On 2/24/2019 at 3:53 PM, dlandon said:

Stop the recycle bin, then try to stop the server.  I don't think the recycle bin is hanging, it's probably the last message displayed before it hangs.

 

 

OK, thanks, good call.  Its in the middle of a 90+ hour copy from one disk to another so I can finally convert all disks to encrypted volumes, but when its done with that I will stop the recycle bin and attempt to stop the server.

 

Assuming it doesn't work, and it still hangs, the GUI freezes completely and thus I cannot run diags to post.  Last time it happened, I ssh'd in and ran 'tail /var/log/syslog' and the last few entries were typical stuff not indicative of any errors.  I haven't had unraid fail to shut down since the 5.x days (when a hard reset was the only way I could do it, literally) but not this has become worrisome again.

 

Link to comment
1 hour ago, tucansam said:

 

 

OK, thanks, good call.  Its in the middle of a 90+ hour copy from one disk to another so I can finally convert all disks to encrypted volumes, but when its done with that I will stop the recycle bin and attempt to stop the server.

 

Assuming it doesn't work, and it still hangs, the GUI freezes completely and thus I cannot run diags to post.  Last time it happened, I ssh'd in and ran 'tail /var/log/syslog' and the last few entries were typical stuff not indicative of any errors.  I haven't had unraid fail to shut down since the 5.x days (when a hard reset was the only way I could do it, literally) but not this has become worrisome again.

 

Make sure all your plugins are up to date.

Link to comment

Manually stopping the Recycle Bin hangs the GUI.

 

Running 'diagnostics' from the shell prompt hangs.

 

login as: root
[email protected]'s password:
Last login: Wed Feb 27 05:40:10 2019 from 192.168.0.53
Linux 4.18.20-unRAID.
root@ffs2:~# cd /
root@ffs2:/# ls
bin/   dev/  home/  lib/    mnt/   root/  sbin/  tmp/  var/
boot/  etc/  init@  lib64/  proc/  run/   sys/   usr/
root@ffs2:/# diagnostics
Starting diagnostics collection...
 

(Nothing ever happens beyond this)

 

 

Here is what I can get:

 

root@ffs2:~# tail /var/log/syslog
Feb 27 02:49:17 ffs2 nginx: 2019/02/27 02:49:17 [error] 19871#19871: *834072 upstream timed out (110: Connection timed out) while reading upstream, client: 192.168.0.53, server: , request: "POST /plugins/unassigned.devices/UnassignedDevices.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.0.5", referrer: "http://192.168.0.5/Main"
Feb 27 05:39:39 ffs2 kernel: mdcmd (181): spindown 12
Feb 27 05:40:10 ffs2 sshd[19803]: Accepted password for root from 192.168.0.53 port 50084 ssh2
Feb 27 05:46:02 ffs2 sshd[24417]: Accepted password for root from 192.168.0.53 port 50161 ssh2
Feb 27 05:46:49 ffs2 ool www[21531]: /usr/local/emhttp/plugins/recycle.bin/scripts/rc.recycle.bin 'empty'
Feb 27 05:46:51 ffs2 Recycle Bin: User: Recycle Bin has been emptied
Feb 27 05:46:54 ffs2 ool www[24117]: /usr/local/emhttp/plugins/recycle.bin/scripts/rc.recycle.bin 'update'
Feb 27 05:46:54 ffs2 Recycle Bin: Stopping Recycle Bin
Feb 27 05:48:42 ffs2 sshd[26830]: Accepted password for root from 192.168.0.53 port 50197 ssh2
Feb 27 05:48:54 ffs2 nginx: 2019/02/27 05:48:54 [error] 19871#19871: *881430 upstream timed out (110: Connection timed out) while reading upstream, client: 192.168.0.53, server: , request: "POST /update.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.0.5", referrer: "http://192.168.0.5/Settings/RecycleBin"
root@ffs2:~#
 

Link to comment
4 hours ago, tucansam said:

Manually stopping the Recycle Bin hangs the GUI.

 

Running 'diagnostics' from the shell prompt hangs.

 

login as: root
[email protected]'s password:
Last login: Wed Feb 27 05:40:10 2019 from 192.168.0.53
Linux 4.18.20-unRAID.
root@ffs2:~# cd /
root@ffs2:/# ls
bin/   dev/  home/  lib/    mnt/   root/  sbin/  tmp/  var/
boot/  etc/  init@  lib64/  proc/  run/   sys/   usr/
root@ffs2:/# diagnostics
Starting diagnostics collection...
 

(Nothing ever happens beyond this)

 

 

Here is what I can get:

 

root@ffs2:~# tail /var/log/syslog
Feb 27 02:49:17 ffs2 nginx: 2019/02/27 02:49:17 [error] 19871#19871: *834072 upstream timed out (110: Connection timed out) while reading upstream, client: 192.168.0.53, server: , request: "POST /plugins/unassigned.devices/UnassignedDevices.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.0.5", referrer: "http://192.168.0.5/Main"
Feb 27 05:39:39 ffs2 kernel: mdcmd (181): spindown 12
Feb 27 05:40:10 ffs2 sshd[19803]: Accepted password for root from 192.168.0.53 port 50084 ssh2
Feb 27 05:46:02 ffs2 sshd[24417]: Accepted password for root from 192.168.0.53 port 50161 ssh2
Feb 27 05:46:49 ffs2 ool www[21531]: /usr/local/emhttp/plugins/recycle.bin/scripts/rc.recycle.bin 'empty'
Feb 27 05:46:51 ffs2 Recycle Bin: User: Recycle Bin has been emptied
Feb 27 05:46:54 ffs2 ool www[24117]: /usr/local/emhttp/plugins/recycle.bin/scripts/rc.recycle.bin 'update'
Feb 27 05:46:54 ffs2 Recycle Bin: Stopping Recycle Bin
Feb 27 05:48:42 ffs2 sshd[26830]: Accepted password for root from 192.168.0.53 port 50197 ssh2
Feb 27 05:48:54 ffs2 nginx: 2019/02/27 05:48:54 [error] 19871#19871: *881430 upstream timed out (110: Connection timed out) while reading upstream, client: 192.168.0.53, server: , request: "POST /update.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.0.5", referrer: "http://192.168.0.5/Settings/RecycleBin"
root@ffs2:~#
 

Update the recycle bin plugin and then see if it helps.  I found a case where the web ui could take a while to respond.  I now update the trash sizes in the background in all cases so the web ui can stay responsive.

Link to comment

Thank you, I sure will.  I've got 60 hours left on a data move from one disk to the others, so I can convert the final disk in the array to an encrypted volume.  So in a couple of days I'll have one more stop/start cycle to do, and will report back.

 

Not busy at all.  Its running plex, unifi, headphones, sonarr, and sab.  Right now the load average is hovering around 8-9 because of the huge rsync job, but its usually between 1-2 if sab or sonarr is busy, and less than 1 when its idle doing nothing.  i7-2600 with 16gb ram.

Link to comment
14 hours ago, tucansam said:

Thank you, I sure will.  I've got 60 hours left on a data move from one disk to the others, so I can convert the final disk in the array to an encrypted volume.  So in a couple of days I'll have one more stop/start cycle to do, and will report back.

 

Not busy at all.  Its running plex, unifi, headphones, sonarr, and sab.  Right now the load average is hovering around 8-9 because of the huge rsync job, but its usually between 1-2 if sab or sonarr is busy, and less than 1 when its idle doing nothing.  i7-2600 with 16gb ram.

When you can do it, go to the command line and run this command rather than using the web ui so it doesn't hang if there is a problem:

/usr/local/emhttp/plugins/recycle.bin/scripts/rc.recycle.bin stop

It should only take a few seconds to return.

 

When I asked about your system being busy, I really meant the amount of disk activity.  The recycle bin trash size has to hit the disks to determine the sizes of the .Recycle.Bin folders and if there is a lot of disk activity it can take a while.  With the recent update, I've moved all trash size checks to the background in case any of this was hanging the UI.  The downside is the trash sizes may show '?' if the trash size check times out, but I guess this is better than a hung up UI.  That large rsync copy could slow down the recycle bin trash size check.

Link to comment
  • 3 weeks later...

If I delete a sub-folder and then "undelete" it by copying or moving it back to the original folder from the user share's .Recycle.Bin, the next day it shows up again in the user share's .Recycle.Bin and is removed from the original folder.  Any suggestions?  Running unRAID 6.6.7, RecycleBin 2019.03.08b, Windows 10.

 

In this example, I deleted the 2018 and 2019 Income Tax sub-folders from the Income Tax Files folder on the Records share.  Later, I copied them back from the .Recycle.Bin to the Income Tax Files folder on the Records share.  The next day, they showed up again in the .Recycle.Bin and were removed from the Income Tax Files folder.

Recycle Bin Snip.PNG

Link to comment
1 hour ago, gacpac said:

Before I make any changes. How do you restore from the recycle bin? 

 

I deleted files and now I need to restore them. I don't see a restore button or anything. 

Browse to the //tower/share/.Recycle.Bin folder and copy out what you want.

Link to comment
2 hours ago, gacpac said:

I would be super cool to add a restore button in the plugin.

Seems like 

On 3/22/2019 at 10:46 AM, dlandon said:

copy out what you want

is exactly the functionality you would want. What would a button do, restore everything? Even Windows Recycle Bin makes you select what to restore.

 

Link to comment
is exactly the functionality you would want. What would a button do, restore everything? Even Windows Recycle Bin makes you select what to restore.
 
Sorry I didn't elaborate, though it was simple enough . But yeah, right now you can browse the recycle bin through the plugin. Would be nice if while browsing you see an option to restore by selecting the folders, or globally restore. Also the option to "restore to" to restore to a different folder that either you have to input manually or have the availability to select.

As the programing goes, it's up to the developer how to implement it. Maybe just enabling selective restore will do the job, you can either select all or pick what you want (folder or file).

I'm always happy to bring new ideas and test.



Sent from my Pixel 2 XL using Tapatalk

Link to comment
  • dlandon changed the title to Recycle Bin (vfs recycle) for SMB Shares

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.