Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jan 2010 04:52:24 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        "Philip M. Gollucci" <pgollucci@p6m7g8.com>
Cc:        rc@freebsd.org
Subject:   Re: [patch] - zfs mount -a *MUST* run before /etc/fstab is processed
Message-ID:  <20100110035224.GC1657@garage.freebsd.pl>
In-Reply-To: <4B48F161.4070602@p6m7g8.com>
References:  <4B47F1DB.8080800@p6m7g8.com> <4B4829B7.1060700@FreeBSD.org> <4B48F161.4070602@p6m7g8.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--t0UkRYy7tHLRMCai
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jan 09, 2010 at 09:13:05PM +0000, Philip M. Gollucci wrote:
> example -
>=20
> $ zpool create zroot ....
> $ zfs set mountpoint=3Dlegacy zroot
> [basically follow the wiki for GPTZFS boot]
>=20
> $ zfs create zroot/software
> $ zfs create -p zroot/jails/x
> $ zfs set mountpoint=3D/software zroot/software
> $ zfs set mountpoint=3D/jails zroot/jails
>=20
> $ mkdir -p /jails/x/software
>=20
> $ cat /etc/fstab
> /software   /jails/x/software nullfs ro 0 0
>=20
> reboot
>=20
> 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
>=20
> 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=3D/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.

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--t0UkRYy7tHLRMCai
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFLSU73ForvXbEpPzQRAm1dAKDDobTp32MHSpTmC8lZta2d2lVt+ACcCcjx
kGUaUPciykrD3nmdSdAIHdc=
=sLSr
-----END PGP SIGNATURE-----

--t0UkRYy7tHLRMCai--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100110035224.GC1657>