Subject: Re: disklabel: /dev/rsd0d: Device busy
To: Frank van der Linden <fvdl@wasabisystems.com>
From: Ken Wellsch <kwellsch@tampabay.rr.com>
List: current-users
Date: 05/25/2001 14:30:58
Frank van der Linden wrote:
> 
> >   # disklabel sd0
> >   disklabel: /dev/rsd0d: Device busy
> 
> Hmm.. it might be that you managed to write a strange label onto
> the disk. For example, the 'd' partition is special on the i386
> port, and you're not supposed to use it. Do you have something
> mounted on it?
> 
> Try booting into single-user and see what disklabel says there.

I've tried that, and still see the same problem.  I've done a
surface analysis three times and one formatting of the drive now.
The Adaptec firmware on the 2940 definitely sees the drive.

A friend lent me his FreeBSD 4.3 CD so for the heck of it I tried
that.  It seems to see the drive - in fact I installed it to see
what might happen.  All went okay, so the drive is sort-of okay.

During install, I saw a long hang (don't know how to see dmesg)
followed by the remainder of the install (hang happened early).

Once booted, I did a "du /usr" and that ran fast as heck, but hung
immediately afterward.  I got this out of dmesg:

(da0:ahc0:0:0:0): SCB 0x1 - timed out while idle, SEQADDR == 0x7
STACK == 0x3, 0x100, 0x159, 0x0
SXFRCTL0 == 0x80
ahc0: Dumping Card State at SEQADDR 0x7
SCSISEQ = 0x12, SBLKCTL = 0x0, SSTAT0 0x5
SCB count = 130
Kernel NEXTQSCB = 120
Card NEXTQSCB = 120
QINFIFO entries: 
Waiting Queue entries: 
Disconnected Queue entries: 4:2 14:12 11:3 13:4 8:7 0:17 3:11 2:19 5:9 6:0
12:13
 1:16 9:15 7:29 10:1 
QOUTFIFO entries: 
Sequencer Free SCB List: 15 
Pending list: 66 67 68 69 50 51 52 53 54 55 56 57 58 59 40 41 42 43 44 45 46
47 
48 49 30 31 32 33 34 35 36 37 38 39 20 21 22 23 24 25 26 27 28 8 5 10 2 12 3 4
7
 17 11 19 9 0 13 16 15 29 1 
Kernel Free SCB list: 65 121 122 123 124 125 126 127 128 129 110 111 112 113
114
 115 116 117 118 119 100 101 102 103 104 105 106 107 108 109 90 91 92 93 94 95
9
6 97 98 99 80 81 82 83 84 85 86 87 88 89 70 71 72 73 74 75 76 77 78 79 60 61
62 
63 64 6 18 14 
sg[0] - Addr 0x7c3f000 : Length 4096
sg[1] - Addr 0x8100000 : Length 4096
(da0:ahc0:0:0:0): Queuing a BDR SCB
(da0:ahc0:0:0:0): Bus Device Reset Message Sent
(da0:ahc0:0:0:0): no longer in timeout, status = 34b
ahc0: Bus Device Reset on A:0. 61 SCBs aborted

After the long timeout/recovery I was back in business and saw
no further errors.

So tagged queueing may be playing a role here.  After this
failure I don't have another.  So is their driver reducing the
max queue len or something.

Even with FreeBSD touching the disk, my NetBSD kernel produces the
same gripe about reading sd(16) on boot and a BUSY when accessed.

Cheers,

-- Ken