From owner-freebsd-questions@FreeBSD.ORG Sat Mar 23 12:01:38 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 11A7E583 for ; Sat, 23 Mar 2013 12:01:38 +0000 (UTC) (envelope-from sts@tp1.rub.de) Received: from mx5.rz.ruhr-uni-bochum.de (mi.ruhr-uni-bochum.de [134.147.64.33]) by mx1.freebsd.org (Postfix) with SMTP id 732FB1D3 for ; Sat, 23 Mar 2013 12:01:36 +0000 (UTC) X-Queued: (qmail 26715 invoked by alias); 23 Mar 2013 11:54:56 -0000 X-Queued: (qmail 26691 invoked by uid 109); 23 Mar 2013 11:54:56 -0000 X-Qmailscanner: from 134.147.240.78 by mx5.rz.ruhr-uni-bochum.de (envelope-from , uid 103) with qmail-scanner-2.01 (sophie: 3.05/3.37/4.83. Clear:RC:1(134.147.240.78):. Processed in 0.045863 secs); 23 Mar 2013 11:54:56 -0000 Received: from neo.tp1.ruhr-uni-bochum.de (134.147.240.78) by mx5.rz.ruhr-uni-bochum.de with SMTP; 23 Mar 2013 11:54:56 -0000 Received: from [192.168.0.100] (ip-178-201-62-251.unitymediagroup.de [178.201.62.251]) (authenticated bits=0) by neo.tp1.ruhr-uni-bochum.de (8.14.4/8.14.4) with ESMTP id r2NBsthY006576 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT) for ; Sat, 23 Mar 2013 12:54:55 +0100 Message-ID: <514D98BF.7090202@tp1.rub.de> Date: Sat, 23 Mar 2013 12:57:51 +0100 From: Stephan Schindel User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130321 Thunderbird/17.0.4 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Attaching GELI device on boot X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Mar 2013 12:01:38 -0000 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