conf/128299: [patch] /etc/rc.d/geli does not mount partitions using
both journal and eli
Martin Beran
mb at tns.cz
Wed Oct 22 19:20:01 UTC 2008
>Number: 128299
>Category: conf
>Synopsis: [patch] /etc/rc.d/geli does not mount partitions using both journal and eli
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 22 19:20:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Martin Beran
>Release: 7.0-RELEASE-p5
>Organization:
Trusted Network Solutions, a. s.
>Environment:
FreeBSD mb.tns.cz 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #4: Tue Oct 21 09:03:29 CEST 2008 root at mb.tns.cz:/usr/obj/usr/src/sys/MB i386
>Description:
I have a file system on a device that combines GELI with GJOURNAL. I should be mounted during system startup, but it is not. The corresponding line in /etc/fstab is:
/dev/ad0s2d.journal.eli /mntgeli ufs rw,async 1 2
This causes an error in scripts /etc/rc.d/geli and /etc/rc.d/geli2 and the file system is not mounted. The scripts do not handle devices with names containing a dot except the dot in ".eli" suffix. The additional dot is propagated to the value of variable $provider_, which is later used as a part of another variable name. Also, the scripts would not handle a situation with GELI not being the top layer in a stack of GEOM modules, for example, if the GJOURNAL and GELI were swapped (/dev/ad0s2d.eli.journal).
>How-To-Repeat:
Add an /etc/fstab line for mounting a file system on a device consisting of a GELI over GJOURNAL or GJOURNAL over GELI and reboot. The file system will not be mounted by the system startup scripts.
>Fix:
The attached patch corrects only the case of GELI over GJOURNAL, not GJOURNAL over GELI.
Patch attached with submission follows:
diff -cr rc.d/geli /etc/rc.d/geli
*** rc.d/geli Wed Oct 22 20:54:46 2008
--- /etc/rc.d/geli Wed Oct 22 08:13:01 2008
***************
*** 54,59 ****
--- 54,60 ----
for provider in ${devices}; do
provider_=`ltr ${provider} '/' '_'`
+ provider_=`ltr ${provider_} '.' '_'`
eval "flags=\${geli_${provider_}_flags}"
if [ -z "${flags}" ]; then
diff -cr rc.d/geli2 /etc/rc.d/geli2
*** rc.d/geli2 Wed Oct 22 20:54:46 2008
--- /etc/rc.d/geli2 Wed Oct 22 08:12:34 2008
***************
*** 43,48 ****
--- 43,49 ----
for provider in ${devices}; do
provider_=`ltr ${provider} '/' '_'`
+ provider_=`ltr ${provider_} '.' '_'`
eval "autodetach=\${geli_${provider_}_autodetach}"
if [ -z "${autodetach}" ]; then
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list