Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jul 2011 20:59:48 +0200
From:      "Christopher J. Ruwe" <cjr@cruwe.de>
To:        <freebsd-fs@freebsd.org>
Subject:   zpool-zfs'es on a GELI-encrypted volume are not mounted at boot [patch included]
Message-ID:  <20110705205948.7eba5b40@dijkstra>

next in thread | raw e-mail | index | archive | help
--MP_/_j1YzQJ_1Mk_pGM4s2u4/Gq
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I run my notebook under FreeBSD 8.2-stable,  r223699. I have setup my
disks with ZFS so that I boot from a very small rpool and mount
datasets, among these /usr from another pool configured on top of an
AES encrypted GELI.

When installing a new world using this setup, it is necessary to
manually adapt /etc/rc.d/mountcritlocal, mountcritlocal_start() to do a
zfs mount -a. Failing to do so causes my rootpool to be mounted (which
follows from rc.conf), then the GELI volume to be unlocked. After this,
the boot routine hangs, as /usr (which resides) on the encrypted vol,
which is not mounted, as the canonical zfs mounts are mounted before
GELI. 

I cannot imagine that I am the only one to run ZFSes on an encrypted
GELI volume. Am I booting this setup in an inadvisable way, so that I
need to run into problems? If not, then it might be an idea to
include a zfs mount -a in mountcritlocal in the canonical rc.d-setup.

Am I getting this right or could you please comment?

Thank you, cheers,
-- 
Christopher J. Ruwe
TZ GMT + 2

--MP_/_j1YzQJ_1Mk_pGM4s2u4/Gq
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=zfs-mountcritlocal.patch

*** /usr/src/etc/rc.d/mountcritlocal	2011-06-30 21:37:46.097575355 +0200
--- /etc/rc.d/mountcritlocal	2011-07-01 18:03:43.518493334 +0200
***************
*** 36,41 ****
--- 36,42 ----
  	done
  	mount_excludes=${mount_excludes%,}
  	mount -a -t ${mount_excludes}
+ 	zfs mount -a
  	err=$?
  	check_startmsgs && echo '.'
  

--MP_/_j1YzQJ_1Mk_pGM4s2u4/Gq--



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