SOLVED After reboot, the new created Jails cannot start, iocage/jailname/root is empty

testcb00

Dabbler
Joined
Feb 3, 2021
Messages
31
Today I boot up my TrueNAS box (shutdown over half a year) as I want to test application using Jails.

I create a new Jail (Base Jail) using the 12.3-RELEASE-p5 Image, but after reboot the Jails cannot start and throw the following error:

Error: [EFAULT] [Errno 2] No such file or directory: '/mnt/iocagePool/iocage/jails/NewJailName/root/etc/rc.conf'

I find that the /mnt/iocagePool/iocage/jails/NewJailName/root/ is empty. I tried to create multiple new Jail and get the same result. The root directory is not empty before I reboot the NAS, but it goes empty after the reboot. My old Jails do not have problem and their /mnt/iocagePool/iocage/jails/OldJailName/root/ is not empty. What is going on?

My pool are encrypted. I am using TrueNAS Core 12.0U8.1

-----------------------------------------------------------------------------------------------------------------------

Not sure if it is solved, I have to use Basejail to create a persistent Jails. Using Basejail Type the root will not be emptied.

-----------------------------------------------------------------------------------------------------------------------

Solved, please see the reply
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Sounds to me more like you have an issue with the pool your jails are on and during import of that pool (on boot) it's somehow rolling back the filesystem to avoid some kind of problem/corruption.

It's hard to imagine that hasn't become more visible as some kind of alert or warning though.

perhaps have a look at the output from dmesg and see if there's anything about the pool in there.
 

testcb00

Dabbler
Joined
Feb 3, 2021
Messages
31
I am a noob to investigate the log file, the related words I find is:
Trying to mount root from zfs:boot-pool/ROOT/12.0-U8.1 []... Root mount waiting for: usbus0 usbus1 CAM

I also attach the whole dmesg log file which is created by dmesg >> /tmp/dmesg.txt
 

Attachments

  • dmesg.txt
    97.1 KB · Views: 97

testcb00

Dabbler
Joined
Feb 3, 2021
Messages
31
Sounds to me more like you have an issue with the pool your jails are on and during import of that pool (on boot) it's somehow rolling back the filesystem to avoid some kind of problem/corruption.

It's hard to imagine that hasn't become more visible as some kind of alert or warning though.

perhaps have a look at the output from dmesg and see if there's anything about the pool in there.
You are right, my iocage is moved from a Replication. The Encryption Keys should be different from the parent and that may cause the problem.

After I manually change the iocage (All Parent and Child Dataset) Encryption Option to inherit, the clone jail Type will not be emptied after reboot.
 
Last edited:
Top