Issue understanding filefolder in pool, wont let me share with SMB

I’ve been dabbling in truenas for years now but never anything too crazy. i recently lost my boot drive to a total failure and i cant recover it but that’s not really the issue.

i installed a new boot SSD and grabbed the latest stable version of scale 25.04 and imported my pools no problem.

one of my pools however has a filefolder where all my data is and I’m no longer able to mount it to SMB to share. NFS seems to work but I’d like to get SMB figured out

this is the error I receive when trying to use smb

Summary

Error: Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/api/base/server/ws_handler/rpc.py”, line 323, in process_method_call
result = await method.call(app, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py”, line 40, in call
result = await self.middleware.call_with_audit(self.name, self.serviceobj, methodobj, params, app)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 883, in call_with_audit
result = await self._call(method, serviceobj, methodobj, params, app=app,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 692, in _call
return await methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/service/crud_service.py”, line 256, in create
return await self.middleware._call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 692, in _call
return await methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/service/crud_service.py”, line 287, in nf
rv = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/schema/processor.py”, line 48, in nf
res = await f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/schema/processor.py”, line 174, in nf
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/smb.py”, line 776, in do_create
verrors.check()
File “/usr/lib/python3/dist-packages/middlewared/service_exception.py”, line 72, in check
raise self
middlewared.service_exception.ValidationErrors: [EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/JFv2/.system: JFv2 - POSIX, JFv2/.system - OFF
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/JFv2/.system/configs-c859517f6d7a497888d06ed58c52b7a6: JFv2 - POSIX, JFv2/.system/configs-c859517f6d7a497888d06ed58c52b7a6 - OFF
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/JFv2/.system/rrd-c859517f6d7a497888d06ed58c52b7a6: JFv2 - POSIX, JFv2/.system/rrd-c859517f6d7a497888d06ed58c52b7a6 - OFF
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/JFv2/.system/services: JFv2 - POSIX, JFv2/.system/services - OFF
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/JFv2/.system/ctdb_shared_vol: JFv2 - POSIX, JFv2/.system/ctdb_shared_vol - OFF
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/JFv2/.system/glusterd: JFv2 - POSIX, JFv2/.system/glusterd - OFF
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/JFv2/.system/syslog-c859517f6d7a497888d06ed58c52b7a6: JFv2 - POSIX, JFv2/.system/syslog-c859517f6d7a497888d06ed58c52b7a6 - OFF
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/JFv2/.system/samba4: JFv2 - POSIX, JFv2/.system/samba4 - OFF
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/JFv2/.system/netdata-c859517f6d7a497888d06ed58c52b7a6: JFv2 - POSIX, JFv2/.system/netdata-c859517f6d7a497888d06ed58c52b7a6 - OFF
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/JFv2/.system/cores: JFv2 - POSIX, JFv2/.system/cores - OFF
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/JFv2/.system/webui: JFv2 - POSIX, JFv2/.system/webui - OFF

i feel like i might have messed up years ago and didn’t have the folder in a data set but in the root of the pool? (if thats possible i could be totally wrong on everything)

I tried search my question but most of the things i found don’t seem to apply to my issue

Perhaps these topics can help:

thanks for the reply! that reading seems to suggest the folder i have in the root of my pool needs to be moved to a dataset.

so currently my setup is /mnt/JFv2/jellyfin
and it seems i need to move it too /mnt/JFv2/NEWDATASET/jellyfin

theres 30tb of data in that folder however and the thought of having to use the shell and mv the folder is stressful ha ha. i read about zfs rename but that comand doesnt work on the jellyfin folder for some reason.

is there a way to move the folder or rename it into the new dataset so i don’t have to have 30 tb moved one by one?

Since you can’t convert a folder into a dataset, no you’d have to create a new dataset and then copy over the folder into the child dataset

mother of god.

lol ok so this is going to be a while getting back up and running huh. that pool is already 80% full so i imagine the mv command is going to tank that 20% during the move. is it better to move the whole folder to my other pool and then back to the orginal pool I’m assuming not

This is going to take the time for you to grasp the difference between datasets and folders, and what is what in your setup.
Shares are based on datsets. If you had shared the content before, you had been sharing a dataset—maybe the root dataset?
sudo zfs list will show existing datasets.

Not necessarily; even in 25.04 you can share directories that aren’t datasets (it may not be recommended, but it’s certainly possible). And it does look like somewhere between 24.04 and 25.04 there have been additional checks implemented that are causing problems.

1 Like

Sorry, I couldn’t resist…

Yes. A while back a check was added to make sure child datasets have the same underlying ACL type as the path being shared. Basically this configuration has never been particularly stable, could lead to bad server and client behavior, and we decided to take steps to prevent users from getting to this point.

We’re overall moving toward having UI workflows that simplify the UX and encourage people toward best practices (like creating datasets for shares rather than sharing the entire pool). These changes kind of spread out across releases.

I think that description explains what I just saw in trying to validate that it’s still possible to share a directory that isn’t a dataset, and points to a bug in that validation logic. To replicate:

  • Have a pool with one or more existing shared datasets
  • Create a directory (not a dataset) of /mnt/dozer/testshare
  • Try to create a SMB share for that directory

Result:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/api/base/server/ws_handler/rpc.py", line 323, in process_method_call
    result = await method.call(app, params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py", line 40, in call
    result = await self.middleware.call_with_audit(self.name, self.serviceobj, methodobj, params, app)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 883, in call_with_audit
    result = await self._call(method, serviceobj, methodobj, params, app=app,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 692, in _call
    return await methodobj(*prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/service/crud_service.py", line 256, in create
    return await self.middleware._call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 692, in _call
    return await methodobj(*prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/service/crud_service.py", line 287, in nf
    rv = await func(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 48, in nf
    res = await f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 174, in nf
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/smb.py", line 776, in do_create
    verrors.check()
  File "/usr/lib/python3/dist-packages/middlewared/service_exception.py", line 72, in check
    raise self
middlewared.service_exception.ValidationErrors: [EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/dozer/timemachine: dozer - POSIX, dozer/timemachine - NFSV4
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/dozer/timemachine/dan: dozer - POSIX, dozer/timemachine/dan - NFSV4
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/dozer/backups: dozer - POSIX, dozer/backups - NFSV4
[EINVAL] sharingsmb_create.path_local: ACL type mismatch with child mountpoint at /mnt/dozer/ha-backups: dozer - POSIX, dozer/ha-backups - NFSV4

Between this behavior and your description, I’m inferring that if the shared path isn’t itself a dataset, the code looks at the parent dataset. And since in this case the parent dataset is the root dataset with POSIX permissions, and there are existing child datasets with different ACL types, it fails.

1 Like

Ah. I see what you’re talking about. You that should be fixed. I’ll write up a bug report.

1 Like

so if just go back to 24.10 i could just carry on. even though its not proper

Seeing this message means that you have mounted an old system dataset within your data pool, which should never happen. Were you manually changing mountpoint settings from shell? You should probably fix this and then the validation error will go away.

1 Like

I’ve honestly never touched the shell before today. I think what I did years ago was shared the pool and then while in windows mounted it as a network drive and then created the folder from there.

I’m bashing my head here. the mv command is only copying my /mnt/JFv2/jellyfin to /mnt/JFv2/NEWSMBDATASET/jellyfin its not deleting each file after it moves it only copies. I don’t have the space available to “move” them all this way so its become an issue. I’ve read all the arguments i can add to mv but none seem to help. is there something I’m missing

Pun intended?
Basic shell subtlety:
mv jellyfin someplace/ copies the jellyfin directory under “someplace”, and then delete the original in one go when the copy is over
mv jellyfin/* someplace/jellyfin/ moves the content of jellyfin one file at a time, deleting each item as it’s done

ha ha I wish that pun was intended!

Thanks! so basically I need to write my command as

mv /mnt/JFv2/jellyfin/* /mnt/JFv2/NEWSMB/jellyfin/

Thanks for the help!