Recycle Bin (vfs recycle) for SMB Shares


dlandon

Recommended Posts

Hello Together,

I have a small problem, I did the installation of the plugin, only unfortunately it does not recognize shares.

I have uninstalled the plugin, reinstalled, tested an older version (did not work), set up Unraid again, created shares in different ways (Cache Only, Yes, No, Prefer).

All shares do not have a .Recycle.Bin, they are not shown to me via SMB or via SSH. I also tested it with WinSCP...

I know it worked once though, because on an older test server, I already had this plugin installed.

 

And before someone asks 🙂 Yes I did a reboot 🙂 

 

Any advices?

Thanks for your help!

 

Here some screenshots.

2021-04-13_17h05_11.png

2021-04-13_17h39_36.png

2021-04-13_17h40_20.png

2021-04-13_17h41_14.png

2021-04-13_17h41_44.png

2021-04-13_17h42_50.png

2021-04-13_17h43_23.png

2021-04-13_17h43_31.png

Link to comment

Hello,

 

I am on unRAID 6.9.2, I have installed the plugin, enabled it and have not excluded any shares.

 

I deleted a file but no recycle bin appears on Windows, I am using the smb additional settings rootshare provided by Spaceinvader to access my smb via one rootshare, I have not modified the smb additional settings after installing the plugin as it seems to have modified it by itself.

 

I have tried to test it by deleting a new file I created and also by deleting a file that already existed. I have turned "Log deleted files" to "yes" and still no luck, nothing appears under "Shares" or "Deleted Files". I would be happy to send my diagnostics file to anyone by pm.

 

For some reason the plugin doesn't seem to work for me but I'm sure it would work wonderfully if it did.

 

Edited by Arby
Link to comment
15 minutes ago, Arby said:

Hello,

 

I am on unRAID 6.9.2, I have installed the plugin, enabled it and have not excluded any shares.

 

I deleted a file but no recycle bin appears on Windows, I am using the smb additional settings rootshare provided by Spaceinvader to access my smb via one rootshare, I have not modified the smb additional settings after installing the plugin as it seems to have modified it by itself.

 

I have tried to test it by deleting a new file I created and also by deleting a file that already existed. I have turned "Log deleted files" to "yes" and still no luck, nothing appears under "Shares" or "Deleted Files". I would be happy to send my diagnostics file to anyone by pm.

 

For some reason the plugin doesn't seem to work for me but I'm sure it would work wonderfully if it did.

 

Post diagnostics.

Link to comment
22 minutes ago, Arby said:

Hello,

 

I am on unRAID 6.9.2, I have installed the plugin, enabled it and have not excluded any shares.

 

I deleted a file but no recycle bin appears on Windows, I am using the smb additional settings rootshare provided by Spaceinvader to access my smb via one rootshare, I have not modified the smb additional settings after installing the plugin as it seems to have modified it by itself.

 

I have tried to test it by deleting a new file I created and also by deleting a file that already existed. I have turned "Log deleted files" to "yes" and still no luck, nothing appears under "Shares" or "Deleted Files". I would be happy to send my diagnostics file to anyone by pm.

 

For some reason the plugin doesn't seem to work for me but I'm sure it would work wonderfully if it did.

 

 

Remove these lines in the smb-extra.conf and try again:

[rootshare]
path = /mnt/user
comment =
browseable = yes
valid users = ***
write list = ***
vfs objects =

You'll have to restart the recycle bin.

 

I suspect the problem line is the 'vfs objects ='.  The recycle bin is a vfs object and I think that line is negating the recycle bin vfs object.

Link to comment
34 minutes ago, dlandon said:

 

Remove these lines in the smb-extra.conf and try again:



[rootshare]
path = /mnt/user
comment =
browseable = yes
valid users = ***
write list = ***
vfs objects =

You'll have to restart the recycle bin.

 

I suspect the problem line is the 'vfs objects ='.  The recycle bin is a vfs object and I think that line is negating the recycle bin vfs object.

 

Would recycle bin plugin not work with rootshare enabled? It would be nice to have rootshare accessible.

 

Anyway I did that and tested again, I can now see the files in the deleted files log but how would the user access the recycle bin? I can't see that a recycle bin has appeared. I will pm you my diagnostics again.

 

GIXlpit.png

Edited by Arby
added screenshot
Link to comment
11 minutes ago, Arby said:

 

Would recycle bin plugin not work with rootshare enabled? It would be nice to have rootshare accessible.

 

Anyway I did that and tested again, I can now see the files in the deleted files log but how would the user access the recycle bin? I can't see that a recycle bin has appeared. I will pm you my diagnostics again.

Any entries in the smb-extras.conf file are global and apply to all shares.  The 'vfs objects =' entry removes the vfs recycle bin added to the individual shares.   Talk with Spaceinvader about why that entry is added to the smb extras.  I don't think it is necessary.  It will also affect other vfs objects added by Unraid.

 

You go to the recycle bin by browsing to it: //tower/share/.Recycle.Bin.

Link to comment
8 minutes ago, dlandon said:

Any entries in the smb-extras.conf file are global and apply to all shares.  The 'vfs objects =' entry removes the vfs recycle bin added to the individual shares.   Talk with Spaceinvader about why that entry is added to the smb extras.  I don't think it is necessary.  It will also affect other vfs objects added by Unraid.

 

You go to the recycle bin by browsing to it: //tower/share/.Recycle.Bin.

 

Hi, thanks again for helping. I will remove the vfs objects line, if you don't think it's necessary, I agree!

 

I still have a problem though, I can't see the Recycle Bin by following your steps, I can't see it anywhere. I have looked in these places:

Going to shares in the unraid GUI (Files is the share I used to delete the test files)

Bv9DW9e.png

smb on my Windows PC:

image.png.9e99ba73e663d72f07e0d006412c4b30.png

Binhex-krusader:

Z9KX29G.png

 

I have checked the cache drive under the unRAID GUI and can't see the share there.


Edit: however, when I go into binhex-krusader, a RecycleBin has appeared there under my main UNRAID path:

image.png.56a58468cc058788f59608c42d139ad7.png

but when I go in, these folders are all empty:

image.png.dd8a43f94dbb67f120ae589f88c8744d.png

Edited by Arby
further info
Link to comment
1 hour ago, dlandon said:

Are the files showing up in the recycle bin log?  If not then you still don't have the recycle bin working.

 

Yes you'e right, they weren't appearing because I had put the rootshare lines back in but without the vfs line you mentioned. I have now removed all of the rootshare lines.

 

It now appears in the deleted files log but the recycle bin folder doesn't appear still:

 

Edited by Arby
removed video
Link to comment
30 minutes ago, dlandon said:

It may take some time to show up.

Still hasn't appeared yet.

 

I appreciate your help, I have given up for today, I'll use the rootshare and in the meanwhile be cautious that I don't have a recycle bin when deleting files as before. Thanks.

Link to comment
On 4/18/2021 at 2:51 PM, coblck said:

Have you got dot files visible on windows and unraid 

 

Hidden files on Windows? Yes I have them visible, not sure how to do that on unRAID but I was running binhex krusader so I assumed I could see everything

Link to comment

I'm not sure when this started happening but the plugin is failing to do two things. 1) display the correct Trash Size for each user share and 2) delete old files.

 

I'm not even sure where to begin with the Trash Sizing issue because the webpage currently shows 66G for Trash Size on the backup share however:

root@storage:/mnt/user/backup/.Recycle.Bin# du -sh ./*
94G     ./MYCOMP
9.9M    ./SQL
root@storage:/mnt/RecycleBin/User Shares/backup# du -sh ./*
94G     ./MYCOMP
9.9M    ./SQL

 

Additionally, it's not deleting old files. It's currently set for 7 days and over the smb share i can see files dated 2021-04-08

root@storage:/mnt/user/backup/.Recycle.Bin/MYCOMP/Backup Job MYCOMP_1# stat Copy\ #1\ of\ Backup\ Job\ MYCOMP.vbm
  File: Copy #1 of Backup Job MYCOMP.vbm
  Size: 295051          Blocks: 584        IO Block: 4096   regular file
Device: 2fh/47d Inode: 648799823889937712  Links: 1
Access: (0666/-rw-rw-rw-)  Uid: (   99/  nobody)   Gid: (  100/   users)
Access: 2021-04-08 11:02:01.997199995 -0400
Modify: 2021-04-08 11:00:34.032458553 -0400
Change: 2021-04-15 08:30:47.766812889 -0400
 Birth: -

 

Version 2021.04.24

Edited by iarp
Link to comment
8 hours ago, iarp said:

I'm not even sure where to begin with the Trash Sizing issue because the webpage currently shows 66G for Trash Size on the backup share however:

That's exactly how the Recycle Bin determines the trash size.  The trash size is determined every minute (background task calculates the trash size every minute) and may be a little behind if the share is very active.

 

8 hours ago, iarp said:

Additionally, it's not deleting old files. It's currently set for 7 days and over the smb share i can see files dated 2021-04-08

The age date is the file atime.  Execute this command and you'll see what files are aged and would be removed:
 

	find /mnt/RecycleBin/User\ Shares/*/* -atime +7

This is how the files are removed by age date.

Link to comment

I'm the only user. The only activity in this share is at 11am from my computer backing up and 7am/7pm sql backups.

 

I executed the find atime command and all of the "Copy #..." files are returned. But they are never deleted.

 

As of now the webpage still shows 66G and its been 9 hours. If i redo a du -sh on the backup recycle bin its at 94G.

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.