Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Mar 2013 12:57:51 +0100
From:      Stephan Schindel <sts@tp1.rub.de>
To:        freebsd-questions@freebsd.org
Subject:   Attaching GELI device on boot
Message-ID:  <514D98BF.7090202@tp1.rub.de>

Next in thread | Raw E-Mail | Index | Archive | Help
Hey,

i've got a problem attaching a geli device on boot. My setup:

ada0 and ada1 full geli setup (no partition schemes). ZFS on both. ada0
is my root device. I can boot into the system there is no problem with
it. But now I want to attach ada1 on boot as well using a single
keyfile. My rc.conf looks like this:

...
geli_autodetach="NO"
geli_devices="ada1"
geli_ada1_flags="-p -k /root/ada1.key"
...

The problem is that geli does not want to attach the device at first. It
claims about (missing?) metadata and inappropriate file format (I dont
know where geli logs this). It tries to attach the device 3 times which
is the default option with no success.

BUT once the system is booted up and I can login, I can manually start

/etc/rc.d/geli onestart

and it will successfully attach the device. So configuration seems to be
fine, only the order the services started seems to be wrong (e.g. devd
is being started AFTER geli tries to attach the device, why??)

Also there is a problem with sabnzbd which is being started before the
network is set-up, which is wrong as well.

Here is my full rc.conf:

hostname="freebsd"
ifconfig_nfe0="DHCP"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
devd_enable="YES"
devfs_enable="YES"
zfs_enable="YES"
rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_flags="-r"
linux_enable="YES"
dbus_enable="YES"
hald_enable="YES"
powerd_flags="-a adp"
sshd_enable="YES"
sabnzbd_user="sts"
sabnzbd_group="sts"
sabnzbd_conf_dir="/usr/home/sts/.sabnzbd"
sabnzbd_enable="YES"
geli_autodetach="NO"
geli_devices="ada1"
geli_ada1_flags="-p -k /root/ada1.key"



I hope somebody can help me,
Stephan



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?514D98BF.7090202>