Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jul 2011 14:26:17 +0200
From:      "Christopher J. Ruwe" <cjr@cruwe.de>
To:        freebsd-questions@freebsd.org
Cc:        freebsd-fs@freebsd.org
Subject:   Fw: zpool-zfs'es on a GELI-encrypted volume are not mounted at boot [patch included]
Message-ID:  <20110710142617.1d80289b@dijkstra>

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

Nearly a week ago I posted this question to freebsd-fs, but probalby my
question is a) worded too complicatedly, b) not really a
filesystem-issue or c) both.

To rephrase: In setups requiring one or more ZFS-dataset to be mounted before another service is activated (GELI in my case) and the rest of the ZFS-datasets after that service is activated (because they require GELI), it seems to be necessary to add a `zfs mount -a` to mountcritlocal. Is this considered correct behaviour and wouldn't it make sense to add such a line to mountcritlocal in the standard setup?

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

Begin forwarded message:

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]


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_/ICitDr9IVUgfV8mY8Yu1fTF
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_/ICitDr9IVUgfV8mY8Yu1fTF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

_______________________________________________
freebsd-fs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"

--MP_/ICitDr9IVUgfV8mY8Yu1fTF--



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