25.10 - Cloud Sync Task Gone - Invalid Character Error

After upgrading to TrueNAS community 25.10-BETA.1 - Goldeye, I noticed that all my cloudsync tasks are gone. When trying to create cloud sync tasks or trying to delete a dataset from my ZFS pool, I get the following error. It appears this version cannot deal with folders that have #'s in the name.

[EZFS_INVALIDNAME]: zfs_open() failed - cannot open 'storage-pool-1/backup/Samples Drive #0': bookmark delimiter '#' is not expected here

The strange thing is, I renamed these folders via the shell and it still throws this error. Here are the middleware logs:

[2025/09/27 13:42:00] (WARNING) middlewared.process_method_call():388 - Exception while calling cloudsync.query(*[]) @cee:{"TNLOG": {"exception": "Traceback (most recent call last):
  File \"/usr/lib/python3/dist-packages/middlewared/api/base/server/ws_handler/rpc.py\", line 354, in process_method_call
    result = await method.call(app, id_, params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py\", line 57, 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 954, in call_with_audit
    result = await self._call(method, serviceobj, methodobj, params, app=app,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 771, in _call
    return await methodobj(*prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/api/base/decorator.py\", line 108, in wrapped
    result = await func(*args)
             ^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/service/crud_service.py\", line 161, in query
    result = await self.middleware.call(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1043, in call
    return await self._call(
           ^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 771, in _call
    return await methodobj(*prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/read.py\", line 156, in query
    result = await self._queryset_serialize(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/read.py\", line 212, in _queryset_serialize
    result = [
             ^
  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/read.py\", line 213, in <listcomp>
    await self._extend(data, extend, extend_context, extend_context_value, select)
  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/read.py\", line 249, in _extend
    data = await self.middleware.call(extend, data, extend_context_value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1043, in call
    return await self._call(
           ^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 771, in _call
    return await methodobj(*prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/service/sharing_service.py\", line 100, in sharing_task_extend
    data[self.locked_field] = await self.middleware.call(
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1043, in call
    return await self._call(
           ^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 771, in _call
    return await methodobj(*prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/service/sharing_service.py\", line 88, in sharing_task_determine_locked
    return await self.middleware.call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1043, in call
    return await self._call(
           ^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 782, in _call
    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 665, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3.11/concurrent/futures/thread.py\", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/plugins/pool_/dataset_encryption_info.py\", line 238, in path_in_locked_datasets
    crypto = tls.lzh.open_resource(name=i).crypto()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
truenas_pylibzfs.ZFSException: [EZFS_INVALIDNAME]: zfs_open() failed - cannot open 'storage-pool-1/backup/Samples Drive #0': bookmark delimiter '#' is not expected here", "type": "PYTHON_EXCEPTION", "time": "2025-09-27 11:42:00.334337"}}

No idea about your specific issue - however my 2p’s worth does say that your practise of dataset / folder naming is going to cause you more issues than its worth. Spaces in file names is bad enough - but spaces in folder names is (IMO) not good practise and should be avoided

I get you, but these are not datasets. At least, not that I remember. If I use ZFS CLI tools it also doesn’t show them as child datasets. These are ordinary folders in the dataset.

Welcome to the TrueNAS forums!

While spaces can be problematic, their are other reserved characters in both pool names and dataset names. The “@” is for snapshots and “#” is for bookmarks:

   Example 1: Creating a bookmark
       The following example creates a bookmark to a snapshot.  This bookmark can
       then be used instead of a snapshot in send streams.
             $ zfs bookmark rpool@snapshot rpool#bookmark

Are you sure that is a folder / directory name, and not a dataset name?

Though, even if it were a dataset name, I am not sure how you could have created it. Perhaps via the GUI, which uses the ZFS API library and not the ZFS command line. Maybe there is a bug in the ZFS API library that allows creating dataset names with "#"s.

I did successfully create an empty file with a pound symbol, (“#”);

arwen:~> touch test#0
arwen:~> cat test#0
arwen:~> rm test#0
rm: remove regular empty file 'test#0'? y

Thanks for the detailed reply. I rolled back to 24.* by changing the GRUB boot image. I can confirm that all my cloud sync tasks reappeared and that the folder in question is NOT a dataset. It’s a folder within a dataset called backup.

I’ve now rid all my cloud sync jobs of configuration containing the pound symbol. Now that they have finally completed I will boot back into 25.10 and see of the error persists.

I can confirm that I cannot create datasets containing a pound symbol.

1 Like

I can confirm that despite my efforts to fix this issue by renaming the folder and fixing all my cloud sync tasks, the issue persists on 25.10-BETA.1 - Goldeye. Rolling back to 25.04.2.1 for now.

1 Like

Hello, I had the same problem with a folder called /#Fotoo for an android program.
and several items were no longer visible in Truenas scale 25.10-BETA 1.
I did a rollback on truenas to 24. and removed all references to that folder.
Going back to 25.10-BETA 1 did not work.
What seems to work is a new install.

I hope this helps

Thanks for the confirmation, this looks like a software bug, will re-test after a stable version is released. If it’s still broken, I will log a formal bug

Better report it now.
There’s no reason to think they would fix something they don’t know about.

I am not able to log a bug in Jira it seems as I do not have permission. Probably a Jira license issue or something and seems I am not the only one. Pity.

I suspect you just picked a restricted category.
You just need an account, there’s no special license required.

Do the report through the TrueNAS Server GUI, the feedback button at the top has a bug report tab.