[patch] - zfs mount -a *MUST* run before /etc/fstab is processed

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun Jan 10 04:18:27 UTC 2010


On Sat, Jan 09, 2010 at 09:13:05PM +0000, Philip M. Gollucci wrote:
> example -
> 
> $ zpool create zroot ....
> $ zfs set mountpoint=legacy zroot
> [basically follow the wiki for GPTZFS boot]
> 
> $ zfs create zroot/software
> $ zfs create -p zroot/jails/x
> $ zfs set mountpoint=/software zroot/software
> $ zfs set mountpoint=/jails zroot/jails
> 
> $ mkdir -p /jails/x/software
> 
> $ cat /etc/fstab
> /software   /jails/x/software nullfs ro 0 0
> 
> reboot
> 
> boom mountcritlocal bombs b/c neither path is available yet only the
> root (zroot) is mounted b/c zfs mount -a hasn't been run yet
> 
> The below patch changes the /etc/rc.d rcorder so that happens in the
> correct order. I've tested it on 2 machines here successfully.

Have you tested something like this:

/etc/fstab:
/dev/da0	/mnt	ufs	rw	0	0

zfs create -o mountpoint=/mnt/foo pool/foo

This is bascially the opposite. Here /etc/fstab must be mounted before
'zfs mount -a' is called.

All in all if you need to mount file systems for your jails use
/etc/fstab.<jailname>. This way rc.d/jail will mount needed file systems
when you start jail.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20100110/e0912b07/attachment.pgp


More information about the freebsd-rc mailing list