Iocage problems.... read only?

I recently ran updates on this box.

I previously did not have any jails or plugins. I decided I want to install a plugin, it asked for a pool, I gave the the only pool I have. Errors followed.

Everything it tries to do with iocage fails, no mount points, read only filesystem. I didn’t do anything myself, everything along with the errors was generated automatically. What’s the fix? Delete iocage and try again? Should iocage be read only?

Error: Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_json.py”, line 650, in json_write
with iocage_lib.ioc_common.open_atomic(write_location, ‘w’) as out:
File “/usr/local/lib/python3.9/contextlib.py”, line 119, in enter
return next(self.gen)
File “/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_common.py”, line 590, in open_atomic
with tempfile(dir=os.path.dirname(os.path.abspath(filepath))) as tmppath:
File “/usr/local/lib/python3.9/contextlib.py”, line 119, in enter
return next(self.gen)
File “/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_common.py”, line 553, in tempfile
tf = tmp.NamedTemporaryFile(delete=False, suffix=suffix, dir=dir)
File “/usr/local/lib/python3.9/tempfile.py”, line 545, in NamedTemporaryFile
(fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File “/usr/local/lib/python3.9/tempfile.py”, line 255, in _mkstemp_inner
fd = _os.open(file, flags, 0o600)
OSError: [Errno 30] Read-only file system: ‘/mnt/NASvol/iocage/tmpy5a5f40s’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/middlewared/plugins/jail_freebsd.py”, line 1074, in get_activated_pool
pool = ioc.IOCage(skip_jails=True, reset_cache=True).get(‘’, pool=True)
File “/usr/local/lib/python3.9/site-packages/iocage_lib/iocage.py”, line 95, in init
self.generic_iocjson = ioc_json.IOCJson()
File “/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_json.py”, line 1372, in init
super().init(location, checking_datasets, silent, callback)
File “/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_json.py”, line 432, in init
self.default_config = self.check_default_config()
File “/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_json.py”, line 1302, in check_default_config
self.json_write(default_props, default_json_location,
File “/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_json.py”, line 654, in json_write
raise FileNotFoundError(write_location)
FileNotFoundError: /mnt/NASvol/iocage/defaults.json

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_check.py”, line 97, in check_datasets
raise ZFSException(-1, ‘Dataset does not exist’)
iocage_lib.zfs.ZFSException: Dataset does not exist

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/iocage_lib/zfs.py”, line 20, in run
cp.check_returncode()
File “/usr/local/lib/python3.9/subprocess.py”, line 460, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command ‘[‘zfs’, ‘create’, ‘-o’, ‘compression=lz4’, ‘-o’, ‘aclmode=passthrough’, ‘-o’, ‘aclinherit=passthrough’, ‘NASvol/iocage/log’]’ returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/middlewared/main.py”, line 139, in call_method
result = await self.middleware._call(message[‘method’], serviceobj, methodobj, params, app=self)
File “/usr/local/lib/python3.9/site-packages/middlewared/main.py”, line 1251, in _call
return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
File “/usr/local/lib/python3.9/site-packages/middlewared/main.py”, line 1156, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
File “/usr/local/lib/python3.9/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.9/site-packages/middlewared/schema.py”, line 985, in nf
return f(*args, **kwargs)
File “/usr/local/lib/python3.9/site-packages/middlewared/plugins/jail_freebsd.py”, line 1078, in get_activated_pool
self.check_dataset_existence()
File “/usr/local/lib/python3.9/site-packages/middlewared/plugins/jail_freebsd.py”, line 1047, in check_dataset_existence
IOCCheck(migrate=True, reset_cache=True)
File “/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_check.py”, line 58, in init
self.check_datasets()
File “/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_check.py”, line 127, in check_datasets
ds.create({‘properties’: dataset_options})
File “/usr/local/lib/python3.9/site-packages/iocage_lib/dataset.py”, line 42, in create
return create_dataset({‘name’: self.resource_name, **data})
File “/usr/local/lib/python3.9/site-packages/iocage_lib/zfs.py”, line 155, in create_dataset
return run([
File “/usr/local/lib/python3.9/site-packages/iocage_lib/zfs.py”, line 22, in run
raise ZFSException(cp.returncode, cp.stderr)
iocage_lib.zfs.ZFSException: cannot mount ‘/mnt/NASvol/iocage/log’: failed to create mountpoint: Read-only file system
filesystem successfully created, but not mounted

Maybe this old thread or this post can help you somehow. What i think i do in your situation Is try reconfigure jails.

p.s. don’t use plugins!

I don’t have any jails, but looking at the second link I tried this:

RESULT IN SYSTEM FAILURE.

root@truenas[~]# iocage clean -a

This will destroy ALL iocage data!

Are you sure? [y/N]: y
Default configuration missing, creating one
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_json.py", line 650, in json_write
    with iocage_lib.ioc_common.open_atomic(write_location, 'w') as out:
  File "/usr/local/lib/python3.9/contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_common.py", line 590, in open_atomic
    with tempfile(dir=os.path.dirname(os.path.abspath(filepath))) as tmppath:
  File "/usr/local/lib/python3.9/contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_common.py", line 553, in tempfile
    tf = tmp.NamedTemporaryFile(delete=False, suffix=suffix, dir=dir)
  File "/usr/local/lib/python3.9/tempfile.py", line 545, in NamedTemporaryFile
    (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
  File "/usr/local/lib/python3.9/tempfile.py", line 255, in _mkstemp_inner
    fd = _os.open(file, flags, 0o600)
OSError: [Errno 30] Read-only file system: '/mnt/NASvol/iocage/tmprux1q70v'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 10, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/iocage_cli/clean.py", line 96, in cli
    ioc.IOCage(skip_jails=True).clean(dataset_type)
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/iocage.py", line 95, in __init__
    self.generic_iocjson = ioc_json.IOCJson()
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_json.py", line 1372, in __init__
    super().__init__(location, checking_datasets, silent, callback)
  File "/usr/local/lib/python3.9/site-packages/iocage_lib/ioc_json.py", line 432, in __init__
    self.default_config = self.check_default_config()
  File "/usr/local/lib/python3.9/site-packages/iocage_li

On storage → pools Is iocage datasets showed as read only?
What truenas version are you running?

Version:

TrueNAS-13.0-U6.2

iocage is readonly true.

This Is kinda strange, Is your pool read only somehow, and iocage datasets have inherited this flag? (Maybe because Is replicated from another system).
If only iocage dataset Is affected, don’t know if just edit It Is viable… but anyway you have another problem: you can’t run jails on 13.0, you need the 13.3 version of core

I did replicate from my old box a couple years ago. readonly inherit is “off” option. on is not inherited. Should I set readonly to off?

Do I need to run jails?

I just wanted to try that Adblock plugin, I can’t see them anymore because iocage is busted and that view errors out now.

Either way I didn’t get very far. Errors happened as soon as I selected the pool when I was prompted on the Plugins page of the interface.

The 13.3 release is confusing… Why isn’t it an update offered through updates on the interface, and why do I need it?

They seem to be encouraging 13.0-U6.2, no?

Besides, shouldn’t I fix iocage first before I even think about upgrading…?

At this point, set read only false to the pool, and inherited to other datasets.

Plugin are deprecated in every core version, so if you want run a adblocker you must install It on your own in a jail… and for run jails you need 13.3 →

Here and Here Is well explained (long read but worth).

I’m not in the loop regarding this stuff. I’ve been running a box since 2017 in a “set it and forget it” manner, and everything has been well… Then I built myself this new box and gave away the old one.

But these recent releases seem a bit of a shitshow. Should I be downgrading? Now I ran into more problems that I don’t have on 11.0 on the old box.

I think that the"bigger" problem has been caused by the replication you did some time ago, but didn’t understand if Is working or not now.

Impossible not agree on this. Except plugin, that are unmaintained since years (eol from some months).
Despite, now the situation Is kinda clear (at least, for who follow the forum).
There Is another option: going direct on Scale instead, if the app you want Is in the official catalogue Will be auto migrated in the transiton on EE

The 13.3 release is only for sustaining existing 13.0 systems with Jails.

In your case, its effectively a new system. We’d recommend SCALE 24.04. Is there any application you can’t get on SCALE?

[quote="Captain_Morgan]Is there any application you can’t get on SCALE?
[/quote]

I don’t know. I wanted my TrueNAS to also host a pi-hole or a similar DNS adblocker and some kind of DLNA server. That on top of the usual RAIDZ2 storage and SMB shares…

I examined the old box from which I replicated and it in fact has no iocage dataset… It was never instantiated, those old releases didn’t use iocage for jails, by default anyway, and there weren’t any anyhow. So, doesn’t look like a replication problem either.

Mmm i was thinking more about to the default flag on the task (that put the pool on readonly, if you don’t uncheck), and then on iocage dataset creation he inherit that property.
But im just assuming was seems plausible to me, on what you are describing