Mounts order: ZFS, /etc/fstab...

I'm running a small home server with /, /usr, /var, etc. on UFS (on a SSD) and a ZFS pool on a pair of HDDs. Since I also have an existing external NAS and run few jails, I'm searching for a documentation regarding FreeBSD mount order during boot time and I cannot find one. It seems /etc/fstab is processed first, ZFS mounts are next, but what to do if I want to mount a NFS export or do a nullfs-mount in a location in the ZFS pool in boot-time?

For example / is UFS (from /etc/fstab), /usr/jails is from ZFS and would like to mount NFS export at /usr/jails/pms/mnt/media during boot time?
 
You will need to create or edit /etc/fstab.pms and it will be mounted when Jail starts. It's much safer this way rather than editing /etc/fstab incorrectly could make your FreeBSD hang at boot.
 
You will need to create or edit /etc/fstab.pms and it will be mounted when Jail starts. It's much safer this way rather than editing /etc/fstab incorrectly could make your FreeBSD hang at boot.

Thank you, this is a good idea.

Try adding the late option to any filesystems that you need deferred until after normal mount order. See mount(8).

I saw late option, but it is not clear at what time during boot process mount is executed with -a and when with -l; can you point me to the related documentation?
 
.../etc/fstab.pms...
Great thing, probably better than the "late" mount option which solved my problem of the jail nullfs mounts happening before the ZFS mounts they depend on finished.
However, searching for fstab.pms yields me only one link, this forum page.
Is there any documentation available on this except of reading the source code?
 
Snurg, I believe this is more like /etc/fstab.<jail-name>.
I think you are right.
Sadly this does not work on my computer.
At least it works with the late option in the "main" fstab, so I can proceed learning how jails work.
 
Back
Top