# mountcritlocal problem with nullfs on zfs in FreeBSD 7.1



## track (Apr 7, 2009)

I experienced a problem with the mountcritlocal script and nullfs on ZFS (for jails) in FreeBSD 7.1.

If there are nullfs entries in /etc/fstab that mount a ZFS directory (which doesn't exist at that time in the boot process) the system startup stops with the "Mounting /etc/fstab filesystems failed, startup aborted" error.
This only happens with 7.1, in 7.0 it was working.

My current solution:
I replaced the 7.1 mountcritlocal script (v 1.14.2.2.2.1 2008/11/25) with the old 7.0 script (v 1.14.4.1 2008/01/28), afterwards it worked again.

Questions:
Is there a way to stop mountcritlocal from mounting nullfs entries in /etc/fstab? (but still mount them later in the boot process, before jail startup) 

Will a changed mountcritlocal get overwritten when I update to a newer FreeBSD version in the future? (I never done a FreeBSD update yet)


my fstab file which causes the error, /pool is a ZFS pool:

```
/dev/da0s1b     none    swap    sw      0       0
/dev/da0s1a     /       ufs     rw      1       1
/dev/da0s1d     /tmp    ufs     rw      2       2
/dev/acd0       /cdrom  cd9660  ro,noauto       0       0

#JAILS
# web Jail
/pool/jail/root         /pool/jail/web/base      nullfs ro 0 0
/pool/jail/web/data     /pool/jail/web/base/j    nullfs rw 0 0
```


----------



## DutchDaemon (Apr 7, 2009)

Change *ro* into *ro,noauto*, and *rw* into *rw,noauto*


----------



## track (Apr 7, 2009)

noauto doesn't work, because it stops the mounting completely. This causes the jail startup to fail, because the jails doesn't have the filesystem mounted.

I'm looking for a way to mount the nullfs entries in /etc/fstab after ZFS initialization but before the jail startup.


----------



## SirDice (Apr 7, 2009)

track said:
			
		

> Questions:
> Is there a way to stop mountcritlocal from mounting nullfs entries in /etc/fstab? (but still mount them later in the boot process, before jail startup)


Move them to /etc/fstab.web if the jail is called 'web'. Add jail_web_fstab="YES" to rc.conf. See /etc/defaults/rc.conf.


----------



## track (Apr 7, 2009)

Thank you, that's exactly what I was looking for, even better (since it's per jail).


----------

