Recycle bin for CIFS home directories?

Status
Not open for further replies.

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
The other day I set up some home directories for the users on my NAS for CIFS, but I noticed that the recycle bin feature isn't enabled on them and since they aren't a share configured in the usual location to configure CIFS shares I am wondering if it is possible to enable the "Export Recycle Bin"
feature on the home shares and if so how I would do it?

I have the home directories set up to be at /mnt/Mirror1/homes/<username> and there are two users at /mnt/Mirror1/homes/knowltey and /mnt/Mirror1/homes/scheris. The "homes" as well as each user is set up as an independent dataset as well since each are set up with a different compression algorithm and data storage quota.

Here is the output of zfs list for reference:

Code:
Mirror1                       549G   364G   176K  /mnt/Mirror1
Mirror1/Bak                  33.4G   267G   168K  /mnt/Mirror1/Bak
Mirror1/Bak/Invision         2.15G  1.85G  2.15G  /mnt/Mirror1/Bak/Invision
Mirror1/Bak/SANDY            30.4G   220G  30.4G  /mnt/Mirror1/Bak/SANDY
Mirror1/Bak/Toshiba           854M  49.2G   853M  /mnt/Mirror1/Bak/Toshiba
Mirror1/Data                  503G   364G   503G  /mnt/Mirror1/Data
Mirror1/Misc                 12.8G   364G   152K  /mnt/Mirror1/Misc
Mirror1/Misc/singleDirMusic  12.8G  3.18G  12.8G  /mnt/Mirror1/Misc/singleDirMusic
Mirror1/homes                66.4M   364G   160K  /mnt/Mirror1/homes
Mirror1/homes/knowltey       12.9M  9.99G  12.4M  /mnt/Mirror1/homes/knowltey
Mirror1/homes/scheris        53.2M  9.95G  53.1M  /mnt/Mirror1/homes/scheris
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
Still looking for assistance regarding this, is there a way to do it through the back end such as editing a configuration file or any sort of command line int he shell I should look into performing to get the .recycle directories working for the various dynamically created home shares?

I noticed in the smb.conf file that one of my shares that does have the recycle bin configured for it is configured as follows:

Code:
[NAS]
    path = /mnt/Mirror1/Data
    printable = no
    veto files = /.snap/.windows/.zfs/
    comment = Main NAS Share
    writeable = yes
    browseable = yes
    inherit owner = yes
    inherit permissions = yes
    recycle:repository = .recycle/%U
    recycle:keeptree = yes
    recycle:versions = yes
    recycle:touch = yes
    recycle:directory_mode = 0777
    recycle:subdir_mode = 0700
    shadow: snapdir = .zfs/snapshot
    shadow: sort = desc
    shadow: localtime = yes
    shadow: format = auto-%Y%m%d.%H%M-2w
    vfs objects =  recycle shadow_copy2 zfsacl
    guest ok = no
    inherit acls = Yes
    map archive = No
    map readonly = no
    nfs4:mode = special
    nfs4:acedup = merge
    nfs4:chown = yes


and the homes directories share is configured as follows:

Code:
[homes]
    comment = Home Directories
    valid users = %U
    writable = yes
    browseable = yes
    path = /mnt/Mirror1/homes/%U


I'm not terribly familiar with editing smb.conf files as yet, but would appending the homes share configuration to the following work to create a recycle bin that would work for each user in their home share?

Code:
[homes]
    comment = Home Directories
    valid users = %U
    writable = yes
    browseable = yes
    path = /mnt/Mirror1/homes/%U
    recycle:repository = .recycle/%U
    recycle:keeptree = yes
    recycle:versions = yes
    recycle:touch = yes
    recycle:directory_mode = 0777
    recycle:subdir_mode = 0700
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
Nope, just currently running a very intensive snapshotting scheme on those datasets as a sort of workaround.
 
Status
Not open for further replies.
Top