From nobody@FreeBSD.org  Sun Jun  6 12:37:42 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D58B81065673
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  6 Jun 2010 12:37:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id C4CC78FC22
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  6 Jun 2010 12:37:41 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o56CbfV6036896
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 6 Jun 2010 12:37:41 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o56Cbfxh036895;
	Sun, 6 Jun 2010 12:37:41 GMT
	(envelope-from nobody)
Message-Id: <201006061237.o56Cbfxh036895@www.freebsd.org>
Date: Sun, 6 Jun 2010 12:37:41 GMT
From: Krzysztof Dajka <alteriks@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Booting 8.1-PRERELEASE raidz system take ages
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         147560
>Category:       kern
>Synopsis:       [zfs] [boot] Booting 8.1-PRERELEASE raidz system take ages
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ae
>State:          patched
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 06 12:40:04 UTC 2010
>Closed-Date:    
>Last-Modified:  Mon Nov 19 13:13:32 UTC 2012
>Originator:     Krzysztof Dajka
>Release:        8.1-PRERELEASE
>Organization:
>Environment:
FreeBSD altstation 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #0: Thu Jun  3 09:58:00 CEST 2010     toor@altstation:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I'm booting from usb memory stick with updated bootcode.
Bootstraping process:

 BTX loader 1.00 BTX version is 1.01
 Console: internal video/keyboard
 BIOS drive C: is disk0
 BIOS drive D: is disk1
 BIOS drive E: is disk2
 BIOS drive F: is disk3
 |
It freezes in this state for over 40 seconds and after that boots normally. I have even tried booting over pxe, I created 1M file  

I have following raidz configuration:

$  gpart show                       
=>       34  976773101  ada0  GPT  (466G)
         34  976773101     1  freebsd-zfs  (466G)

=>       34  976773101  ada1  GPT  (466G)
         34  976773101     1  freebsd-zfs  (466G)

=>       34  976773101  ada2  GPT  (466G)
         34  976773101     1  freebsd-zfs  (466G)

=>   34  60733  da0  GPT  (30M)
     34    128    1  freebsd-boot  (64K)
    162  60605       - free -  (30M)

$  zpool status
  pool: zroot
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scrub: none requested
config:

        NAME           STATE     READ WRITE CKSUM
        zroot          ONLINE       0     0     0
          raidz1       ONLINE       0     0     0
            gpt/disk0  ONLINE       0     0     0
            gpt/disk1  ONLINE       0     0     0
            gpt/disk2  ONLINE       0     0     0


>How-To-Repeat:
Update to 8.1-PRERELEASE, update bootcode 
>Fix:


>Release-Note:
>Audit-Trail:

From: Krzysztof Dajka <alteriks@gmail.com>
To: bug-followup@freebsd.org, alteriks@gmail.com
Cc:  
Subject: Re: amd64/147560: [boot] Booting 8.1-PRERELEASE raidz system take 
	ages
Date: Tue, 8 Jun 2010 21:33:12 +0200

 --001485f1972c55a58f048889ddda
 Content-Type: text/plain; charset=UTF-8
 
 I have done few test and narrowed problem to probing usb devices. I have
 taken following steps:
 
 1) I prepared installed bootcode to 3 devices
 - 512MB Kingston flash drive
 - 32MB SD Card
 - 1MB file (created with dd, mounted with mdconfig, added gpt partition and
 freebsd-boot slice) booted over pxe
 2) All devices had newest bootcode, booting from every device was terrible
 slow, but sd card was significantly slower than others.
 3) I played with my zpool
 # zpool offline zroot gpt/disk2
 4) reboot
 5) I booted with every device. Booting from both devices connected to usb
 bus, was slow. Booting over pxe from 1MB 'drive' with bootcode was very fast
 as it should be.
 6) Booting over pxe with any device attached to usb bus was again slow!
 
 --001485f1972c55a58f048889ddda
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable
 
 <br> I have done few test and narrowed problem to probing usb devices. I ha=
 ve<br>taken following steps:<br><br>1) I prepared installed bootcode to 3 d=
 evices<br>- 512MB Kingston flash drive<br>- 32MB SD Card<br>- 1MB file (cre=
 ated with dd, mounted with mdconfig, added gpt partition and<br>
 
 freebsd-boot slice) booted over pxe<br>2) All devices had newest bootcode, =
 booting from every device was terrible<br>slow, but sd card was significant=
 ly slower than others.<br>3) I played with my zpool<br># zpool offline zroo=
 t gpt/disk2<br>
 
 4) reboot<br>5) I booted with every device. Booting from both devices conne=
 cted to usb<br>bus, was slow. Booting over pxe from 1MB &#39;drive&#39; wit=
 h bootcode was very fast<br>as it should be.<br>6) Booting over pxe with an=
 y device attached to usb bus was again slow!<br>
 
 
 --001485f1972c55a58f048889ddda--
Responsible-Changed-From-To: freebsd-amd64->freebsd-bugs 
Responsible-Changed-By: avg 
Responsible-Changed-When: Fri Oct 8 09:37:58 UTC 2010 
Responsible-Changed-Why:  
This is a generic zfs boot problem resulting from how the code 
finds disks for zfs pools. 
Not sure if we can do any better here. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147560 
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Oct 8 10:28:51 UTC 2010 
Responsible-Changed-Why:  
apparently ZFS-specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147560 
State-Changed-From-To: open->patched 
State-Changed-By: ae 
State-Changed-When: Mon Aug 6 04:35:08 UTC 2012 
State-Changed-Why:  
Patched in head/ with r239068. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147560 
Responsible-Changed-From-To: freebsd-fs->ae 
Responsible-Changed-By: ae 
Responsible-Changed-When: Mon Nov 19 13:12:52 UTC 2012 
Responsible-Changed-Why:  
Take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147560 
>Unformatted:
