Subject: ccd problem?
To: None <port-i386@netbsd.org>
From: Ray Phillips <r.phillips@jkmrc.uq.edu.au>
List: port-i386
Date: 12/14/2002 14:34:45
I'm running NetBSD 1.6 on a Pentium II 350 MHz machine with two IDE 
disks (one's a master on the primary controller, the other's a master 
on the secondary), both of which are practically new.  The system had 
been behaving nicely and I was almost ready to put it into production 
use.

However, I thought I'd make use of three old SCSI disks so I used ccd 
to concatenate them with no striping.  (My intention was to connect 
them all to a single SCSI controller when I got a ribbon cable with 
four connectors, but for the time being I connected one disk to one 
controller and two to another.)  I made sure to offset the ccd 
partition on each disk by one cylinder, and made their filesystem 
type ccd.  The contents of /etc/ccd.conf were:

# ccd   ileave  flags   component devices
ccd0    0       none    /dev/sd0e /dev/sd1e /dev/sd2e

Executing 'ccdconfig -vC' seemed to work, as did  'newfs 
/dev/rccd0e'.  I mounted the partition with 'mount /dev/ccd0e /mnt', 
copied a directory (named photos, about 550 MB in size) to /mnt and 
ran 'diff -r photos /mnt/photos' which said one of the binary files 
was different but it didn't complete its tests because the system 
froze and I had to power cycle it.  These messages were on the 
console before I did:

sd1(trm0:0:1:0): SCSI OpCode 0x0a timed out
trm0: over/under run error
sd1(trm0:0:1:0): generic HBA error
ccd0: error 5 on component 1

Now when I power up the machine (and during use) errors like this 
appear on the console:

wd0: transfer error, downgrading to Ultra-DMA mode 1
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA data transfers)
wd0a: error reading fsbn 1051232 of 1051232-1051233 (wd0 bn 1051295; 
cn 1042 tn 15 sn 14), retrying
wd0: (uncorrectable data error)
wd0: transfer error, downgrading to DMA mode 2
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
wd0a: error reading fsbn 1051232 of 1051232-1051233 (wd0 bn 1051295; 
cn 1042 tn 15 sn 14), retrying
wd0e: error reading fsbn 41177552 of 41177552-41177567 (wd0 bn 
46465520; cn 46096 tn 11 sn 59), retrying
wd0: (uncorrectable data error)
wd0: soft error (corrected)

Do you think the fact that these errors started immediately I began 
to use a ccd partition was just a bizarre coincidence or are they 
linked somehow?  The impression I got from scanning the mail archives 
is ccd is mature and robust these days.

I should mention I was using a non-GENERIC kernel.  Because I want to 
run squid on this PC with its diskd option I followed Greg's 
suggestions as per 
http://mail-index.netbsd.org/current-users/2001/11/10/0014.html and 
used

options         SEMMNI=32       # number of semaphore identifiers
options         SHMMAXPGS=4096  # 1024 pages is the default
options         MSGMNB=16384    # special stuff for squid diskd
options         MSGMNI=41
options         MSGSEG=2049
options         MSGSSZ=64
options         MSGTQL=512

also increasing nmbclusters to 4096 and the maximum process size to 620 MB

options NMBCLUSTERS=4096
options DFLDSIZ=650117120
options MAXDSIZ=650117120


I'll append dmesg's output to this email.

One other question, dmesg says

total memory = 639 MB
avail memory = 586 MB

What happens to the missing 53 MB?  Is the memory mentioned in the next line:

using 6144 buffers containing 32844 KB of memory

part of that?


Ray





NetBSD 1.6 (GENERIC-squid) #0: Mon Dec  9 12:40:19 EST 2002
     ray@ap1.jkmrc.uq.edu.au:/usr/src-1.6/sys/arch/i386/compile/GENERIC-squid
cpu0: Intel Pentium II/Celeron (Deschutes) (686-class), 350.82 MHz
cpu0: I-cache 16 KB 32b/line 4-way, D-cache 16 KB 32b/line 2-way
cpu0: L2 cache 512 KB 32b/line 4-way
cpu0: features 183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features 183f9ff<PGE,MCA,CMOV,FGPAT,PSE36,MMX>
cpu0: features 183f9ff<FXSR>
total memory = 639 MB
avail memory = 586 MB
using 6144 buffers containing 32844 KB of memory
BIOS32 rev. 0 found at 0xfb3b0
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443BX Host Bridge/Controller (rev. 0x03)
agp0 at pchb0: aperture at 0xd0000000, size 0x8000000
ppb0 at pci0 dev 1 function 0: Intel 82443BX AGP Interface (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
pcib0 at pci0 dev 7 function 0
pcib0: Intel 82371AB PCI-to-ISA Bridge (PIIX4) (rev. 0x02)
pciide0 at pci0 dev 7 function 1: Intel 82371AB IDE controller 
(PIIX4) (rev. 0x01)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <Maxtor 6E040L0>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 39205 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 80293248 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) 
(using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
wd1 at pciide0 channel 1 drive 0: <ST330620A>
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 28629 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 58633344 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
pciide0: secondary channel interrupting at irq 15
wd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) 
(using DMA data transfers)
uhci0 at pci0 dev 7 function 2: Intel 82371AB USB Host Controller 
(PIIX4) (rev. 0x01)
uhci0: interrupting at irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
Intel 82371AB Power Management Controller (PIIX4) (miscellaneous 
bridge, revision 0x02) at pci0 dev 7 function 3 not configured
vga1 at pci0 dev 8 function 0: S3 ViRGE/DX (rev. 0x01)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
siop0 at pci0 dev 9 function 0: Symbios Logic 53c875 (ultra-wide scsi)
siop0: using on-board RAM
siop0: interrupting at irq 12
scsibus0 at siop0: 16 targets, 8 luns per target
ex0 at pci0 dev 10 function 0: 3Com 3c905C-TX 10/100 Ethernet with 
mngmt (rev. 0x78)
ex0: interrupting at irq 5
ex0: MAC address 00:04:75:98:0a:31
exphy0 at ex0 phy 24: 3Com internal media interface
exphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
trm0 at pci0 dev 11 function 0: Tekram DC395U, DC315/U (TRM-S1040) 
Fast20 Ultra SCSI Adapter
trm0: interrupting at irq 11
scsibus1 at trm0: 8 targets, 8 luns per target
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
lpt0 at isa0 port 0x378-0x37b irq 7
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: no ISA Plug 'n Play devices found
biomask ff45 netmask ff65 ttymask ffe7
scsibus0: waiting 2 seconds for devices to settle...
scsibus1: waiting 2 seconds for devices to settle...
Kernelized RAIDframe activated
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)