kern/124973: boot order affects geom_journal consumers selection

Alexei Volkov Alexei.Volkov at softlynx.ru
Wed Jun 25 06:20:01 UTC 2008


>Number:         124973
>Category:       kern
>Synopsis:       boot order affects geom_journal consumers selection
>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 Jun 25 06:20:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Alexei Volkov
>Release:        osrelease: 7.0-STABLE osreldate: 700108
>Organization:
softlynx
>Environment:
FreeBSD testhost 7.0-STABLE FreeBSD 7.0-STABLE #0: Mon May 26 12:44:12 UTC 2008     root at builder:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
The system has hardware RAID controller:

atapci0 at pci0:1:2:0:     class=0x010485 card=0x341b8086 chip=0x7275105a rev=0x01 hdr=0x00
    vendor     = 'Promise Technology Inc'
    device     = 'PDC20277 FastTrak TX/SBFastTrak133 Lite EIDE Controller'
    class      = mass storage
    subclass   = RAID


This controller configured as
# atacontrol status ar0
ar0: ATA RAID1 status: READY
 subdisks:
   0 ad4  ONLINE
   1 ad6  ONLINE

ar0 labeled as 
# ls -l /dev/ar0*
crw-r-----  1 root  operator    0,  83 Jun 25 09:22 /dev/ar0
crw-r-----  1 root  operator    0,  86 Jun 25 09:22 /dev/ar0s1
crw-r-----  1 root  operator    0,  99 Jun 25 13:22 /dev/ar0s1a
crw-r-----  1 root  operator    0, 100 Jun 25 09:22 /dev/ar0s1b
crw-r-----  1 root  operator    0, 101 Jun 25 09:22 /dev/ar0s1c
crw-r-----  1 root  operator    0, 102 Jun 25 09:22 /dev/ar0s1d
crw-r-----  1 root  operator    0, 103 Jun 25 09:22 /dev/ar0s1e
crw-r-----  1 root  operator    0, 104 Jun 25 09:22 /dev/ar0s1f

And gjournal provider was configured with
# gjournal label /dev/ar0s1d
# gjournal label /dev/ar0s1e
# gjournal label /dev/ar0s1f

with subsequent
#newfs -J /dev/ar0s1d.journal
#newfs -J /dev/ar0s1e.journal
#newfs -J /dev/ar0s1f.journal

and the /boot/loader.conf has the line
geom_journal_load="YES"

/etc/fstab as followed:

/dev/ar0s1a             /               ufs     rw              1       1
/dev/ar0s1b             none            swap    sw              0       0
/dev/ar0s1d.journal     /var            ufs     rw              2       2
/dev/ar0s1e.journal     /tmp            ufs     rw              2       2
/dev/ar0s1f.journal     /usr            ufs     rw              2       2
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0

rebooting is failed due gjournal starts using ad4* as consumers instead ar0* devices.

If the geom_journal.ko module loaded not via /boot/loader.conf but from rc.d scripts it consumes right ar0* devices.



>How-To-Repeat:
Use livefs installation. Manually label file systems as described in full description, install the system and reboot.
>Fix:
Use special /etc/rc.d/gjournal script instead /boot/loader.conf line.

#!/bin/sh
#
# /etc/rc.d/gjournal 
#

# PROVIDE: gjournal
# REQUIRE: localswap
# BEFORE: fsck mountcritlocal
# KEYWORD: nojail

. /etc/rc.subr

name="gjournal"
start_cmd="gjournal_start"
stop_cmd=":"

gjournal_start()
{
        echo  'Starting gjournal providers.'
        /sbin/gjournal load
}

load_rc_config $name
run_rc_command "$1"


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list