SMB share: "export recycle bin" with nested datasets

Joined
Dec 24, 2018
Messages
5
Probably it was not a good idea what I have done ... :rolleyes: ... (on FreeNAS-11.2-RELEASE-U1). My intention is having different Snapshot tasks on nested datasets.

I added several datasets as you see in the picture below. All kept their default settings. Then I shared data-private and data-public via SMB with "Export Recycle Bin" enabled. SMB sharing changed the dataset share type of data-private and data-public from Unix automatically to Windows. Nested datasets kept share type Unix (so far I'm fine with it).

On remotes machines either Windows or Ubuntu deleted files in e.g. data-public go directly into data-public/.recylce folder (with Ubuntu 16.04 first into .Trash folder). Nested datasets are accessible by the share as well. But files deleted within nested datasets are deleted completely (same for files in sub-folders) - files doesn't end up in data-public/.recylce. However the funny part a sub-folder tree is created. In addition I changed the share type from one nested dataset to Windows but behavior stays same.
  • nested datasets shouldn't be used underneath SMB shares?
  • any recommendations about share type of nested datasets?
  • what's a good reason for nested datasets?
  • network shares should be created at "deepest" dataset level?

1546365482896.png
1546370657093.png



Just started moving from Ubuntu server 14.04 LTS to FreeNAS 11.2, so far I'm quite happy :)
 
Joined
Jan 18, 2017
Messages
524
There are a couple threads on this forum in regards to the recycling bin not collecting files that are deleted from nested datasets within a share which I believe was in the user manual of an earlier version of FreeNAS but does not appear to be in the current documentation. I personally cannot think of a good reason to use nested dataset within a share, using windows ACL's you can control access to individual folders accurately. I do have multiple datasets shared from the same machine based on the importance and intend use of the contain shared within.

PS. actually now that i typed that a reason to use a nested dataset in a share is if you specifically do not want any of the files contained within to be picked up by the recycling bin and manage the snapshots for it separately (or none at all).......
 
Joined
Dec 24, 2018
Messages
5
you're right cobrakill58, there are threads discussion the SMB recycle bin issue :)
  • One Dataset, many SMB shares, or one dataset per SMB share? Post no. #6
    Due to flexibility one dataset per share is preferable. Just keep two things in mind:
    Moving data between datasets involves copying data to the new location followed by deleting the old copy, just like with plain old disk partitions. If possible avoid nested datasets. Some features like the SMB recycle bin do not work correctly with nested datasets and in general nested datasets often lead to tricky situations if not administered very carefully.

  • Recycle bin not showing files Post no. #12
    ... The recycle bin will not work if the deleted files and the recycle directory are in different datasets. More info in this 2013 post .
    Your options appear to be:
    1. Merge datasets into one large dataset; or
    2. Add shares for the child datasets and turn on the export recyle bin feature on those shares.
    [*]It's the same reason why the recycle bin feature doesn't work with home directories.
  • Recycle bin only keeps folders, files do not appear in recycle bin Post no. #9 - the one from 2013
    ... the problem here is that the Samba vfs_recycle module is not able to move files across filesystem/dataset boundaries. When the deleted file and the .recycle directory are in different datasets the move fails.

Conclusion: not to enable recycle bin for samba shares containing nested datasets!
 
Top