Target fails to start with permission denied error on Raspberry Pi 5

Hello!

I’m trying to use a Raspberry Pi 5 as an iSCSI target in a convenient form factor.

I did some experiments with Alma 9.5 x64 first to get a feel for it, was satisfied it would work, bought the hardware and installed the Alma 9.5 image for RPi5.

It’s up and running, I created a raid5 using LVM and went to install and configure targetcli.

Unfortunately, after installing targetcli, trying to start the target service I’m getting the following error:

File "/usr/lib/python3.9/site-packages/rtslib_fb/node.py", line 73, in _create_in_cfs_ine
    raise RTSLibError("Could not create %s in configFS"
rtslib_fb.utils.RTSLibError: Could not create RTSRoot in configFS
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/rtslib_fb/node.py", line 71, in _create_in_cfs_ine
    os.mkdir(self.path)
PermissionError: [Errno 1] Operation not permitted: '/sys/kernel/config/target'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/bin/targetctl", line 82, in <module>
    main()
  File "/usr/bin/targetctl", line 79, in main
    funcs[sys.argv[1]](savefile)
  File "/usr/bin/targetctl", line 47, in restore
    errors = RTSRoot().restore_from_file(restore_file=from_file)
  File "/usr/lib/python3.9/site-packages/rtslib_fb/root.py", line 86, in __init__
    self._create_in_cfs_ine('any')
  File "/usr/lib/python3.9/site-packages/rtslib_fb/node.py", line 73, in _create_in_cfs_ine
    raise RTSLibError("Could not create %s in configFS"
rtslib_fb.utils.RTSLibError: Could not create RTSRoot in configFS

Am I missing something? Is there something I can do to fix this or should I just wait for an update?