Recycle Bin (vfs recycle) for SMB Shares


dlandon

794 posts in this topic Last Reply

Recommended Posts

Yes, but he is convinced the xfs recycle plugin is what did it.  I have unassigned devices on my test server and had the issue there, but I don't see how the xfs recycle plugin could do anything to bring that in.

 

He says he has never had unassigned devices installed.  Strange.

I am the user that was having the documento issue. I am sure that I was affected with the bug creating the smb-share file. Which it appears that you have located.  I am not sure about the documento share. I still have not tracked down a reason for that to occur.  Ian grateful for your work on this and look forward to trying it again later this morning..

Link to post
  • Replies 793
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

This is a plugin that will create a per share .Recycle.Bin folder on each smb share for files deleted on that share.  Built into samba is a module called "vfs recycle" that handles the deletion of fil

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

No longer true.  I'm releasing a new version that will not show any remote mounted shares and the local recycle bin will not remove any files from the remote share recycle bins.  Only the local server

Posted Images

Yes, but he is convinced the xfs recycle plugin is what did it.  I have unassigned devices on my test server and had the issue there, but I don't see how the xfs recycle plugin could do anything to bring that in.

 

He says he has never had unassigned devices installed.  Strange.

I am the user that was having the documento issue. I am sure that I was affected with the bug creating the smb-share file. Which it appears that you have located.  I am not sure about the documento share. I still have not tracked down a reason for that to occur.  Ian grateful for your work on this and look forward to trying it again later this morning..

 

Let me know if it occurs again.  If it does, please get me a copy of the /boot/config/smb-extra.conf.

Link to post

Yes, but he is convinced the xfs recycle plugin is what did it.  I have unassigned devices on my test server and had the issue there, but I don't see how the xfs recycle plugin could do anything to bring that in.

 

He says he has never had unassigned devices installed.  Strange.

I am the user that was having the documento issue. I am sure that I was affected with the bug creating the smb-share file. Which it appears that you have located.  I am not sure about the documento share. I still have not tracked down a reason for that to occur.  Ian grateful for your work on this and look forward to trying it again later this morning..

 

The issue I had on my test server was from unassigned devices creating the Documentos share.  It had/has nothing to do with vfs recycle.  My earlier post wasn't clear about that and I wanted to set the record straight.

Link to post

Yes, but he is convinced the xfs recycle plugin is what did it.  I have unassigned devices on my test server and had the issue there, but I don't see how the xfs recycle plugin could do anything to bring that in.

 

He says he has never had unassigned devices installed.  Strange.

I am the user that was having the documento issue. I am sure that I was affected with the bug creating the smb-share file. Which it appears that you have located.  I am not sure about the documento share. I still have not tracked down a reason for that to occur.  Ian grateful for your work on this and look forward to trying it again later this morning..

 

I just updated to the new plugin and I am no longer having my shares disappear.  I still have yet to figure out why the documento folder happened.  If I had installed that plugin it would have been removed many months ago.  I guess it is possible I just don't remember ever installing it.

thanks for your work on this :o)

Let me know if it occurs again.  If it does, please get me a copy of the /boot/config/smb-extra.conf.

Link to post

I've just released a new version with some added Recycle Bin control and a browse feature.  You will have to uninstall the plugin and re-install it for the configuration settings to work properly.  The only reason you can't do an update is that the configuration settings won't be applied properly.  I've take out the empty the trash when the plugin is removed so your Recycle Bin won't be emptied when you uninstall the plugin.  Once I stop with the configuration settings changes, the update plugin will work and be a lot smoother.  For now I think I am done with configuration changes.  Sorry about all the changes, but I am learning as I go.

 

There is new feature in the plugin.  When the Recycle Bin has deleted files (trash can icon shows contents), you can click on the trash can and then browse the Recycle Bin contents from the webgui.  I find this feature pretty handy and convenient.

 

I changed the weekly cron task to remove files based on aged days.  You set the number of days of deleted files you want to keep when the weekly cron runs.  All deleted files older that aged days will be removed.  Files are dated by when they were deleted, not by the original date on the file.

 

I also added a button under the trash can that will remove files when you click on it based on the age days.  This will allow you to remove older deleted files, but not have to empty the trash completely to remove older files.

Link to post

Just updated and started your plugin.  I deleted a few test files and it works Works great from a window box as i can browse the recycle bin folder, however from the mac box i get "the operation can't be completed because the original item for recycle bin can't be found.I have the mac set up to delete the .DS_store files using blue harvest and have disabled able it thinking that might have been the issue.  But still get the same error message from the mac.  Any ideas?

 

Link to post

I assume you are saying that you cannot browse the files in the webgui using a MAC?  Are you using Safari?

 

The file browse is built into unRAID.  Try to browse files on a disk by clicking on the folder with a magnifying glass all the way to the right of the disk information line and see if that acts the same way.

Link to post

I've added a lot more information on how vfs recycle works and the operation of the plugin.

 

If anyone feels there needs to be more settings to control the operation of the vfs recycle, let me know and I'll see if it makes sense for the wider audience.

 

It's already been suggested that I allow the setting of minimum and maximum file sizes that would be put in the .Recycle.Bin when deleted.  I'm not sure how valuable this would be.

 

Another one I've been thinking of is to allow setting the files to be excluded.

Link to post

I assume you are saying that you cannot browse the files in the webgui using a MAC?  Are you using Safari?

 

The file browse is built into unRAID.  Try to browse files on a disk by clicking on the folder with a magnifying glass all the way to the right of the disk information line and see if that acts the same way.

I am trying to browse the folder in finder not the web gui.. 

Link to post

I assume you are saying that you cannot browse the files in the webgui using a MAC?  Are you using Safari?

 

The file browse is built into unRAID.  Try to browse files on a disk by clicking on the folder with a magnifying glass all the way to the right of the disk information line and see if that acts the same way.

I am trying to browse the folder in finder not the web gui..

 

Try setting the read only setting off in the recycle bin settings.  Make the recycle bin read/write.

Link to post

I assume you are saying that you cannot browse the files in the webgui using a MAC?  Are you using Safari?

 

The file browse is built into unRAID.  Try to browse files on a disk by clicking on the folder with a magnifying glass all the way to the right of the disk information line and see if that acts the same way.

I am trying to browse the folder in finder not the web gui..

 

Try setting the read only setting off in the recycle bin settings.  Make the recycle bin read/write.

Nope still gives the error message...  hmm

Link to post

Several updates today.  The most notable is that I was deleting the /boot/config/vfs_recycle/config/smb-extra.conf file so your settings would be lost on a reboot.  After update, go to the settings and click default and then reapply your settings.

Link to post

Appears to be working for me. One oddity I noticed though. When I delete a file from my flash share, it creates the directory structure for it, but no file. Deleting from my normal user shares works as expected. Maybe something to do with the /boot path vs the /mnt path. Not worth worrying about if you don't see an obvious fix.

 

I've done some experimenting with deleting from the flash drive and I believe I see what is going on.  The vfs recycle is set up on a global basis for all shares.  The .Recycle.Bin share is /mnt/user/.Recycle.Bin.  The flash drive is mounted at /boot.  vfs recycle sees a deleted file from the flash but wants to store it at /mnt/user/flash/.Recycle.Bin which it can't.  So it chooses disk1 and creates the file structure, but the file is on the flash so it cannot create the directory entry on disk1 for the file on the flash.

 

vfs recycle works by moving the directory entry for a deleted file to the .Recycle.Bin folder on the same disk as the physical file.  It does not move the file from one disk to another.

 

If a file is on the cache drive when it is deleted, the file will be in the /mnt/user/cache/.Recycle.Bin folder.  The mover will not move a dot file or directory so the cache .Recycle.Bin files will stay where they are.

 

I've been watching the recycle bin over the last few days and I see some interesting files that got deleted in normal operation.  Deleted files are not just files a user deleted.  I have a Windows 7 VM recording TV shows and I have a script that removes duplicate shows.  I'm seeing the duplicate TV recordings show up in the recycle bin that the script deleted.

Link to post

Is the setting for Recycle Bin Users a comma separated list of unRaid users?

 

I setup the newest version today on a server and I can not access the recycle bin through Windows explorer. I can access ".Recycle.Bin" if I go through a disk share such as "disk1", but I can not access the user share called "RecycleBin".

Link to post

Is the setting for Recycle Bin Users a comma separated list of unRaid users?

 

I setup the newest version today on a server and I can not access the recycle bin through Windows explorer. I can access ".Recycle.Bin" if I go through a disk share such as "disk1", but I can not access the user share called "RecycleBin".

 

Yes commas to separate users.  I'll fix the help text to explain that better.

 

You would access the recycle bin in Windows explorer by using //Tower/.Recycle.Bin

Link to post

Is the setting for Recycle Bin Users a comma separated list of unRaid users?

 

I setup the newest version today on a server and I can not access the recycle bin through Windows explorer. I can access ".Recycle.Bin" if I go through a disk share such as "disk1", but I can not access the user share called "RecycleBin".

 

Yes commas to separate users.  I'll fix the help text to explain that better.

 

You would access the recycle bin in Windows explorer by using //Tower/.Recycle.Bin

Actually, you access the recycle bin in Windows explorer by using \\Tower\RecycleBin
Link to post

I have been able to implement a per share recycle bin with user access based on their share access.  In other words if the user can access the share, they can access the recycle bin.  I am putting the final touches on the plugin before I release it.

 

The downside to this new scheme with the .Recycle.Bin folders at the share level and not the disk level is compatibility with the earlier versions of the plugin.  To upgrade you will have to empty the old trash bin, uninstall the old plugin and then install the new version.

 

I apologize for all the gyrations on this plugin, but it wasn't as simple a task as converting the old V5 plugin to V6.  I wanted share level recycle bin and unRAID User access.  I now think I finally have it.

 

One of the things I have seen is that the .Recycle.Bin share folders on the cache drive get moved off the cache drive to the array.  This is good because the cache drive won't fill with deleted files.

Link to post

One of the things I have seen is that the .Recycle.Bin folders on the cache drive shares get moved off the cache drive to the array.

What? I thought that was fixed when they changed the default mover implementation to only move cache "yes" shares instead of ignoring cache "only" shares.

 

Does the .Recycle.Bin share have a normal share property page in the gui?

Link to post
  • 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.