Failed retreiving GROUP quotas

jspfunk

Dabbler
Joined
Oct 26, 2017
Messages
48
First, I did google the error and have been trying to figure it out before I posted.

I'm not sure what change caused the issue. Recently changed my Plex pool from the default (Generic) to SMB. At the same time I tried to create a VM. I did get a permissions error after I went through all the setting for the VM. I think I need to add libvirt permissions to the folder I keep the ISO for Linux.

Now when I go the the Plex pool, I do not see all the folder (I have attached screen shots of what I see in Plex under Datasets and My Windows File Explorer). In Windows I see all the folders and have full permissions. when I try to open the folder "Movies" I get the in the error screen shot.

I'm not sure what change caused the error, changing the ACL type or creating the VM.

This is the More Info on the error.


Code:
 Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/plugins/zfs_/dataset_quota.py", line 75, in get_quota
    with libzfs.ZFS() as zfs:
  File "libzfs.pyx", line 529, in libzfs.ZFS.__exit__
  File "/usr/lib/python3/dist-packages/middlewared/plugins/zfs_/dataset_quota.py", line 77, in get_quota
    quotas = resource.userspace(quota_props)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "libzfs.pyx", line 3642, in libzfs.ZFSResource.userspace
libzfs.ZFSException: cannot get used/quota for Plex/Files/Media/Movies: dataset is busy

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/concurrent/futures/process.py", line 256, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 112, in main_worker
    res = MIDDLEWARE._run(*call_args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 46, in _run
    return self._call(name, serviceobj, methodobj, args, job=job)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 34, in _call
    with Client(f'ws+unix://{MIDDLEWARE_RUN_DIR}/middlewared-internal.sock', py_exceptions=True) as c:
  File "/usr/lib/python3/dist-packages/middlewared/worker.py", line 40, in _call
    return methodobj(*params)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/zfs_/dataset_quota.py", line 79, in get_quota
    raise CallError(f'Failed retreiving {quota_type} quotas for {ds}')
middlewared.service_exception.CallError: [EFAULT] Failed retreiving USER quotas for Plex/Files/Media/Movies
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 201, in call_method
    result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1342, in _call
    return await methodobj(*prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 177, in nf
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/pool_/dataset_quota_and_perms.py", line 223, in get_quota
    quota_list = await self.middleware.call(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1399, in call
    return await self._call(
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1350, in _call
    return await self._call_worker(name, *prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1356, in _call_worker
    return await self.run_in_proc(main_worker, name, args, job)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1267, in run_in_proc
    return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1251, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
middlewared.service_exception.CallError: [EFAULT] Failed retreiving USER quotas for Plex/Files/Media/Movies
 

Attachments

  • 1706206642071.png
    1706206642071.png
    289.1 KB · Views: 56
  • Plex Folders.png
    Plex Folders.png
    34 KB · Views: 55
  • Movie_Folder_Dataset_Details.png
    Movie_Folder_Dataset_Details.png
    325.4 KB · Views: 56

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
. At the same time I tried to create a VM. I did get a permissions error after I went through all the setting for the VM. I think I need to add libvirt permissions to the folder I keep the ISO for Linux.
Yes if you want to point to an existing location libvirt needs to have ACL access to that path.

For the rest I have a theory. First of all, I stumbled upon the error [EFAULT] Failed retreiving USER quotas myself when I upgraded to cobia. If I remember correctly it was after initial installation and setting up all datasets / smb shares. I would be 95 % sure this is not a problem. I did need to reboot the servers anyway and since rebooting I didn't encounter that message again on either machine. I didn't have time / a spare machine to further test that theory. Although it probably it isn't, in my book I just marked it as a GUI error. It didn't have any impact for me and after rebooting it went away. What version are you on?

What I'm not sure about is the following: Is a child dataset really visible when the parent dataset is mapped via SMB?

If I got you right you got the datasets confused in GUI. The GUI will only show you the datasets (hence my previous question). You cannot browse the contents of the datasets in the truenas GUI like you can in windows.
I'm lacking the understanding to correctly explain in detail, but basically you have datasets and these datasets can contain all your directories and folders. Truenas however will only display the dataset level in the GUI. You should be able to browse them via the shell though. This also means that yes, while you cannot view the contents media in the gui you should be able to create a smb share for /plex/files/media/AtomFX for example.
I guess someone else can / will explain this better.
 

jspfunk

Dabbler
Joined
Oct 26, 2017
Messages
48
@chuck32 thank you for you reply. I forgot I got lazy and did not make the other folders datasets. I just updated to TrueNAS-SCALE-23.10.1.3 right before I posted this to see if maybe it was an issue that was fixed in the new release. I have rebooted a couple of times since first receiving the error, and I am still getting the error on the Movies folder
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
Mmh, then maybe it was an unresolved SMB / ACL I coincidentally sorted out before rebooting. I don't know for sure.

What is your ACL setup like? Did you apply permissions recursively? You don't *need* to make a separate dataset for every directory.
Make a movie dataset, mount it via smb and be work from there. In my books there's really no need to be able to see every directory as a dataset in the GUI.

I just checked, child-datasets show up on the parent SMB share. My best idea would be that probably
Recently changed my Plex pool from the default (Generic) to SMB.
this triggered a change in your permissions and that you did not (my install prompted me to go to ACL manager when I created the child dataset) apply correct permissions to your child datasets. From your post I would assume that you can access Movies from windows.

Please post your ACL for files, media and also for movies. Maybe this will give us some idea, I assume there will be a difference. Or you could verify that movies and downloads both are of the same type as plex (SMB in that case). Assuming there are no different permissions intended on your side, you could strip ACL for the child datasets and configure them the same way as you configured your parent dataset. I don't really work with child datasets though, so I don't have much experience in how they inherit the parent dataset ACL. I could image this can resolve the issue, maybe reboot afterwards to make sure.

Otherwise you should maybe create a jira ticket if you believe this behaviour is a bug.
 

jspfunk

Dabbler
Joined
Oct 26, 2017
Messages
48
@chuck32 I have attached screen shots of my ACL for each folder. I am not sure if there is an way to show you my ACL's. I did strip all the ACL's from all the folders and set up Files ACL's and made it recursive and applied them to all child data sets. I still get the error and only on Movies.
 

Attachments

  • Downloads_ACL.png
    Downloads_ACL.png
    97 KB · Views: 40
  • Files_ACL.png
    Files_ACL.png
    88.4 KB · Views: 37
  • Media_ACL.png
    Media_ACL.png
    95.4 KB · Views: 24
  • Movies_ACL.png
    Movies_ACL.png
    97.1 KB · Views: 38

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
I have a last idea. When you recreate the ACL, do that again and use a preset (restricted for example). You deviate a lot from the default config.

Usually it is ower = root, owner group = root (you may need to set that separately and probably before setting a new ACL with a preset, when you strip the ACL and use a preset, I'm not sure this will be changed automatically).
The preset should include access for owner@ - root, @owner - group, builtin users and builtin admins. This will be done by using the preset. Then manually add your user / group.

My assumption is, since you are root / admin in the GUI and you don't have permission, that this will lead to the error.
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
@jspfunk

This is what my default settings look like and what I meant to describe above:

1706302702891.png
 
Top