SMB home share auto creates directories, not datasets

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Hi all,

I have an AD integrated installation with a share named "home" that contains users' personal directories. zfs_core:zfs_auto_create = true is set - I did not do this manually, seems to be created by TrueNAS. Same for the share path.

This is the full configuration:
Code:
[homes]
    comment = Home Directories
    ea support = No
    kernel share modes = No
    path = /mnt/fusion/share/home/%D/%U
    posix locking = No
    read only = No
    smbd max xattr size = 2097152
    vfs objects = fruit streams_xattr ixnas zfs_core aio_fbsd
    zfs_core:zfs_auto_create = true
    fruit:resource = stream
    fruit:metadata = stream
    nfs4:chown = true


Users' home directories are created when they first connect. But only as directories, not as separate data sets what I would expect and prefer.

Any ideas?

Kind regards,
Patrick
 

Volts

Patron
Joined
May 3, 2021
Messages
210
On CORE? It used to behave differently on Core (ixnas module something) vs. Scale.


But I haven't kept up with changes to the zfs_core and ixnas modules.
 
Joined
Jul 3, 2015
Messages
926
Yes, I can confirm that adding zfs_core:zfs_auto_create=true as an auxiliary parameter works.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Does not work here:
Code:
ry93@truenas:~ $ id
uid=100001128(ry93) gid=100000514(domänen-benutzer) groups=100000514(domänen-benutzer),90000001(BUILTIN\administrators),90000002(BUILTIN\users),100000513(domänen-admins),100000573(abgelehnte rodc-kennwortreplikationsgruppe),100001128(ry93),100002666(certsvc_dcom_access),100002684(team-mops),100002685(gesellschafter),100002688(vpn-users),100002712(mitarbeiter),100002782(atlassian-admins),100002797(atlassian-users),100002826(crowd-administrators),100002837(ox-users),100002843(owncloud-users),100002845(rocket-users),100002863(service-desk-users)
ry93@truenas:~ $ pwd
/mnt/fusion/share/home/INTERN/ry93
ry93@truenas:~ $ df .
Filesystem          1K-blocks Used       Avail Capacity  Mounted on
fusion/share/home 19354779028 1252 19354777776     0%    /mnt/fusion/share/home


So it is created, but it's just a directory.
 
Joined
Jul 3, 2015
Messages
926
Mine is creating a dataset as designed on TrueNAS 13-U2. Do you only have zfs_core:zfs_auto_create=true in your auxiliary parameters?
 
Joined
Jul 3, 2015
Messages
926
If you have already connected before the zfs_core:zfs_auto_create=true was applied/working then it may not work for your user. Either create a new area or if you can blow the other one away and try again.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
That's exactly what I did. Delete everything, connect anew, a directory gets created instead of a dataset. When I write "a directory is created" that implies that there was none before. I can reproduce that as often as I like here.

Now, anything constructive?
 
Joined
Jul 3, 2015
Messages
926
The only difference I can see between your share config and mine is you have the fruit vfs object and I don't along with the two fruit aux parameters so you could try removing them and seeing if that works.

Hopefully that's constructive enough :wink:
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I have no auxiliary parameters at all. But the output of testparm -s is "the truth", isn't it? That's why I posted that. Let's see if @anodos can shed some light on this issue.

Thanks for trying to help. :smile:
 
Last edited:
Joined
Jul 3, 2015
Messages
926
It appears that if you have enabled Apple protocol extensions in SMB Services it won't work. I've just tried this myself. Try and turn it off and see what happens.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
But we are a 100% Mac shop on the desktop/client side ...
 
Joined
Jul 3, 2015
Messages
926
Im sure you are but at least you now know why it doesn't work by default.
 
Joined
Jul 3, 2015
Messages
926
Ok so it seems like if you disable Apple protocol extensions in Services SMB but instead add this to the aux parameters in the share it works.

vfs objects=shadow_copy_zfs full_audit zfs_space zfsacl streams_xattr zfs_core ixnas fruit
zfs_core:zfs_auto_create=true
zfs_core:base_user_quota=1T
fruit:resource=stream
fruit:metadata=stream
 
Joined
Jul 3, 2015
Messages
926
feel free to remove shadow_copy and full_audit they are just my preference
 
Joined
Jul 3, 2015
Messages
926
I think the issue may be the way the vfs objects are stacked by default
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Thanks for your help. I'll wait for another statement from our resident guru, though. I'd prefer to have a supported future/update proof configuration, not one that is possibly only working "now".
 
Top