According to the method https://github.com/open-iscsi/rtslib-fb/tree/master/rtslib
def _gen_attached_luns(self):
'''
Fast scan of luns attached to a storage object. This is an order of
magnitude faster than using root.luns and matching path on them.
'''
isdir = os.path.isdir
islink = os.path.islink
listdir = os.listdir
realpath = os.path.realpath
path = self.path
from .root import RTSRoot
from .target import LUN, TPG, Target
from .fabric import target_names_excludes
for base, fm in ((fm.path, fm) for fm in RTSRoot().fabric_modules if fm.exists):
for tgt_dir in listdir(base):
if tgt_dir not in target_names_excludes:
tpgts_base = "%s/%s" % (base, tgt_dir)
for tpgt_dir in listdir(tpgts_base):
luns_base = "%s/%s/lun" % (tpgts_base, tpgt_dir)
if isdir(luns_base):
for lun_dir in listdir(luns_base):
links_base = "%s/%s" % (luns_base, lun_dir)
for lun_file in listdir(links_base):
link = "%s/%s" % (links_base, lun_file)
if islink(link) and realpath(link) == path:
val = (tpgt_dir + "_" + lun_dir)
val = val.split('_')
target = Target(fm, tgt_dir)
yield LUN(TPG(target, val[1]), val[3])
it scans subfolders under the /iscsi/ folder to delete luns. Everything is treated as a folder except the:
excludes_list = [
# version_attributes
"lio_version", "version",
# discovery_auth_attributes
"discovery_auth",
# cpus_allowed_list_attributes
"cpus_allowed_list",
]
where this cpus_allowed_list is excluded. So it shouldn't still try to access it as a folder. the reason is, in the targetcli you are using, this cpus_allowed_list is not in the excludes_lsit.
By checking the latest commit for the fabric module
https://github.com/open-iscsi/rtslib-fb/commit/8d2543c4da62e962661011fea5b19252b9660822
I see
So this might indicate that the targetcli is out dated in Unraid 6.10.3 for some systems that has cpus_allowed_list.
Thank you
Edit: targetcli 2.1.54 is already the newest version for and no newer package has been built. We need to rebuild the targetcli to use the latest rtslib-fb.