Error in iocage jail mount_nullfs Resource deadlock avoided

Status
Not open for further replies.

jerryjharrison

Explorer
Joined
Jan 15, 2014
Messages
99
I am really struggling with this one. I have several jails with different applications installed showing the same error. This leads me to believe that it is something in the fstab config, but I can't find the error.

I have a newly created zfs dataset on the host located at /mnt/zpool1/plexmedia

I have an iocage jail, created with:
Code:
iocage create --name "mainplex" -r 11.1-RELEASE ip4_addr="vnet0|10.0.1.71/24" vnet="on" allow_raw_sockets="1" defaultrouter="10.0.1.1" boot="on" host_hostname="mainplex"


I then created a single FSTAB entry. using the command:
Code:
iocage fstab -a mainplex '/mnt/zpool1/plexmedia /mnt/plexmedia  nullfs  rwx  0  0'


The results from
Code:
iocage fstab -l mainplex

Code:
| 0	 | /mnt/zpool1/plexmedia /mnt/iocage/jails/mainplex/root/mnt/plexmedia nullfs rwx 0 0 |


I then get an error when starting the jail:
Code:
root@corral1:/ # iocage start mainplex
* Starting mainplex
  + Start FAILED
jail: mount.fstab: /mnt/iocage/jails/mainplex/root/mnt/plexmedia: No such file or directory


The only logical thing to do is go create the missing directory:
Code:
mkdir /mnt/iocage/jails/mainplex/root/mnt/plexmedia
root@corral1:/ # ls /mnt/iocage/jails/mainplex/root/mnt
plexmedia


Jail now starts
Code:
root@corral1:/ # iocage start mainplex
* Starting mainplex
  + Started OK
  + Configuring VNET OK
  + Starting services OK


The very next command is a restart of the jail and I get the error:
Code:
root@corral1:/ # iocage restart mainplex
* Stopping mainplex
  + Running prestop OK
  + Stopping services OK
  + Tearing down VNET OK
  + Removing jail process OK
  + Running poststop OK
* Starting mainplex
  + Start FAILED
mount_nullfs: /mnt/iocage/jails/mainplex/root/mnt/plexmedia: Resource deadlock avoided
jail: /sbin/mount -t nullfs -o rwx /mnt/zpool1/plexmedia /mnt/iocage/jails/mainplex/root/mnt/plexmedia: failed


If I comment out the FSTAB entry, the jail starts normally. If I uncomment the entry, the error reappears immediately. (no clean start)
If the HOST is rebooted, the jail starts normally one time, and then upon restart of the jail, the error prevents the jail from starting.

There is clearly a process that is using the resource, but I cannot determine what is locking it.
 
Joined
Jul 10, 2016
Messages
521
There's no rwx option in fstab. Change your fstab entry to make it rw instead, or just delete/add back it as
Code:
iocage fstab -a mainplex '/mnt/zpool1/plexmedia /mnt/plexmedia  nullfs  rw  0  0'


To clean up the resource w/o rebooting your system, you can manually unmount the rogue entry by executing the following as root in the FreeNAS host:
Code:
umount /mnt/zpool1/plexmedia
 

jerryjharrison

Explorer
Joined
Jan 15, 2014
Messages
99
Jurgen. A big thanks! The removal of the execute permission solved this for all of my jails. The amount command would not work, and gave the error that the resource was busy, but a final reboot of the host, and I can restart the jails once more. I really appreciate the response.
 
Status
Not open for further replies.
Top