misc/124130: [gmirror][usb] gmirror fails to start usb devices that were present at boot time

Kena kena at vodka-pomme.net
Fri May 30 12:50:01 UTC 2008


>Number:         124130
>Category:       misc
>Synopsis:       [gmirror][usb] gmirror fails to start usb devices that were present at boot time
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 30 12:50:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Kena
>Release:        7.0-STABLE
>Organization:
>Environment:
FreeBSD fungus.kalhua 7.0-STABLE FreeBSD 7.0-STABLE #2: Fri May 30 13:10:57 CEST 2008     root at fungus.kalhua:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Using a gmirror/gjournal filesystem on 2 external USB drives, the gmirror device is not detected during boot if the drives are connected prior to booting.

It should.

It is detected correctly if the USB drives are connected *after* the boot has completed (after "login" starts).

Configuration (when all is fine):

umass0: <NEC Electronics uPD720133, class 0/0, rev 2.00/0.00, addr 2> on uhub3
umass1: <NEC Electronics uPD720133, class 0/0, rev 2.00/0.00, addr 3> on uhub3
da0 at umass-sim1 bus 1 target 0 lun 0
da0: <SAMSUNG SP1604N TM10> Fixed Direct Access SCSI-2 device 
da0: 40.000MB/s transfers
da0: 152627MB (312581808 512 byte sectors: 255H 63S/T 19457C)
da1 at umass-sim0 bus 0 target 0 lun 0
da1: <SAMSUNG SP1604N TM10> Fixed Direct Access SCSI-2 device 
da1: 40.000MB/s transfers
da1: 152627MB (312581808 512 byte sectors: 255H 63S/T 19457C)

# glabel status
      Name  Status  Components
ufs/dumpty     N/A  da0s2a
ufs/humpty     N/A  da1s2a
    ufs/ao     N/A  mirror/cxm.journal

# gjournal status
              Name  Status  Components
mirror/cxm.journal     N/A  mirror/cxm

# gmirror status
      Name    Status  Components
mirror/cxm  COMPLETE  da0s1
                      da1s1


dmesg report when booting the system with the drives connected prior to boot:
Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-STABLE #2: Fri May 30 13:10:57 CEST 2008
    root at fungus.kalhua:/usr/obj/usr/src/sys/GENERIC
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) 4 CPU 1.80GHz (1793.36-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf24  Stepping = 4
  Features=0x3febfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,M
MX,FXSR,SSE,SSE2,SS,HTT,TM>
real memory  = 1072107520 (1022 MB)
avail memory = 1035526144 (987 MB)
kbd1 at kbdmux0
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
acpi0: <DELL GX260  > on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, f00000 (3) failed
acpi0: reservation of 1000000, 3ee71000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
cpu0: <ACPI CPU> on acpi0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> mem 0xf0000000-0xf7ffffff,0xff680000-0xff6fffff irq 9 at device 2.0 on pci0
agp0: <Intel 82845M (845M GMCH) SVGA controller> on vgapci0
agp0: detected 892k stolen memory
agp0: aperture size is 128M
hci0: <Intel 82801DB (ICH4) USB controller USB-A> port 0xff80-0xff9f irq 9 at device 29.0 on pci0
uhci0: [GIANT-LOCKED]
uhci0: [ITHREAD]
usb0: <Intel 82801DB (ICH4) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 2 ports with 2 removable, self powered
uhci1: <Intel 82801DB (ICH4) USB controller USB-B> port 0xff60-0xff7f irq 11 at device 29.1 on pci0
uhci1: [GIANT-LOCKED]
uhci1: [ITHREAD]
usb1: <Intel 82801DB (ICH4) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb1
uhub1: 2 ports with 2 removable, self powered
uhci2: <Intel 82801DB (ICH4) USB controller USB-C> port 0xff40-0xff5f irq 10 at device 29.2 on pci0
uhci2: [GIANT-LOCKED]
uhci2: [ITHREAD]
usb2: <Intel 82801DB (ICH4) USB controller USB-C> on uhci2
usb2: USB revision 1.0
uhub2: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb2
uhub2: 2 ports with 2 removable, self powered
ehci0: <Intel 82801DB/L/M (ICH4) USB 2.0 controller> mem 0xffa00800-0xffa00bff irq 3 at device 29.7 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb3: EHCI version 1.0
usb3: companion controllers, 2 ports each: usb0 usb1 usb2
usb3: <Intel 82801DB/L/M (ICH4) USB 2.0 controller> on ehci0
usb3: USB revision 2.0
uhub3: <Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb3
uhub3: 6 ports with 6 removable, self powered
umass0: <NEC Electronics uPD720133, class 0/0, rev 2.00/0.00, addr 2> on uhub3
umass1: <NEC Electronics uPD720133, class 0/0, rev 2.00/0.00, addr 3> on uhub3
pcib1: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci1: <ACPI PCI bus> on pcib1
rl0: <RealTek 8139 10/100BaseTX> port 0xec00-0xecff mem 0xff8ffc00-0xff8ffcff irq 9 at device 7.0 on pci1
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> PHY 0 on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
rl0: Ethernet address: 00:50:fc:0d:6f:8a
rl0: [ITHREAD]
dc0: <Intel 21143 10/100BaseTX> port 0xe880-0xe8ff mem 0xff8ff800-0xff8ffbff irq 11 at device 8.0 on pci1
miibus1: <MII bus> on dc0
dcphy0: <Intel 21143 NWAY media interface> PHY 31 on miibus1
dcphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc0: Ethernet address: 00:c0:ca:17:63:4d
dc0: [ITHREAD]
em0: <Intel(R) PRO/1000 Network Connection 6.9.5> port 0xe840-0xe87f mem 0xff8c0000-0xff8dffff irq 10 at device 12.0 on pci1
em0: [FILTER]
em0: Ethernet address: 00:08:74:13:6a:c7
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH4 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
pci0: <multimedia, audio> at device 31.5 (no driver attached)
fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FILTER]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio0: [FILTER]
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xcafff,0xcb000-0xcbfff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ulpt0: <Brother HL-2030 series, class 0/0, rev 2.00/1.00, addr 2> on uhub1
ulpt0: using bi-directional mode
Timecounter "TSC" frequency 1793362192 Hz quality 800
Timecounters tick every 1.000 msec
ad0: 38172MB <MAXTOR 6L040J2 A93.0500> at ata0-master UDMA100
acd0: CDROM <Lite-On LTN486S 48x Max/YDS4> at ata1-master UDMA33
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <SAMSUNG SP1604N TM10> Fixed Direct Access SCSI-2 device 
da0: 40.000MB/s transfers
da0: 152627MB (312581808 512 byte sectors: 255H 63S/T 19457C)
da1 at umass-sim1 bus 1 target 0 lun 0
da1: <SAMSUNG SP1604N TM10> Fixed Direct Access SCSI-2 device 
da1: 40.000MB/s transfers
da1: 152627MB (312581808 512 byte sectors: 255H 63S/T 19457C)
GEOM_LABEL: Label for provider da0s2a is ufs/humpty.
GEOM_LABEL: Label for provider da1s2a is ufs/dumpty.
Trying to mount root from ufs:/dev/ad0s1a


At this point the system is up, the two "regular" UFS filesystems are mounted, but the device mirror/cxm has not been enabled:

# gmirror status
(no output)

When using "gmirror unload; gmirror load" nothing happens (i.e. no disk activity, no further dmesg output, no new devices)

After unmounting da0s2a and da1s2a and unplugging/replugging the drives to the system, dmesg reports the following additional messages:

umass1: at uhub3 port 4 (addr 3) disconnected
(da1:umass-sim1:1:0:0): lost device
(da1:umass-sim1:1:0:0): removing device entry
GEOM_LABEL: Label ufs/dumpty removed.
umass1: detached
umass0: at uhub3 port 2 (addr 2) disconnected
(da0:umass-sim0:0:0:0): lost device
(da0:umass-sim0:0:0:0): removing device entry
GEOM_LABEL: Label ufs/humpty removed.
umass0: detached
umass0: <NEC Electronics uPD720133, class 0/0, rev 2.00/0.00, addr 2> on uhub3
umass1: <NEC Electronics uPD720133, class 0/0, rev 2.00/0.00, addr 3> on uhub3
da0 at umass-sim1 bus 1 target 0 lun 0
da0: <SAMSUNG SP1604N TM10> Fixed Direct Access SCSI-2 device 
da0: 40.000MB/s transfers
da0: 152627MB (312581808 512 byte sectors: 255H 63S/T 19457C)
da1 at umass-sim0 bus 0 target 0 lun 0
da1: <SAMSUNG SP1604N TM10> Fixed Direct Access SCSI-2 device 
da1: 40.000MB/s transfers
da1: 152627MB (312581808 512 byte sectors: 255H 63S/T 19457C)
GEOM_LABEL: Label for provider da0s2a is ufs/dumpty.
GEOM_MIRROR: Device mirror/cxm launched (2/2).
GEOM_JOURNAL: Journal 2557790385: mirror/cxm contains data.
GEOM_JOURNAL: Journal 2557790385: mirror/cxm contains journal.
GEOM_JOURNAL: Journal mirror/cxm clean.
GEOM_LABEL: Label for provider da1s2a is ufs/humpty.
GEOM_LABEL: Label for provider mirror/cxm.journal is ufs/ao.

At this point the device mirror/cxm is ready to use and can be mounted successfully.





>How-To-Repeat:
1. configure a 2-way mirror on external USB drives
2. reboot the system while keeping the external drives connected (and externally powered)

observe: the gmirror is not detected upon system startup.
>Fix:
Disconnect and reconnect the USB drives. 

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


More information about the freebsd-bugs mailing list