| Summary: | mlx0: I/O error - attempt to write beyond end of drive | ||
|---|---|---|---|
| Product: | Base System | Reporter: | antonenk <antonenk> |
| Component: | kern | Assignee: | freebsd-scsi (Nobody) <scsi> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.1-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-bugs->msmith Over to maintainer. It could be a faulty LBA(Logical Block Addressing) handler in the kernel. Lucas Thode State Changed From-To: open->feedback Is this still a problem with modern versions of FreeBSD? Responsible Changed From-To: msmith->freebsd-bugs With bugmeister hat on, reassign from inactive committer. Responsible Changed From-To: freebsd-bugs->freebsd-scsi Reassign to appropriate mailing list. The same problem appears on my Alpha. Seems like the controller doesn't like
I/O size larger than 64k, and by hacking PAGE_SIZE (8k on alpha) to 4k will
make the driver decide the max. 65536 bytes I/O block.
This hack works for me, but i don't know how to fix it on i386 and/or other
Mylex controllers. I suggest you try something like:
# dd if=/dev/rmlxd0c bs=XXX of=/dev/zero
with different block sizes and see when the I/O errors will appear.
--- mlx_disk.c.orig Mon Jun 25 07:37:51 2001
+++ mlx_disk.c Fri Nov 5 12:42:54 2004
@@ -267,8 +267,10 @@
* maximum.
*/
s1 = sc->mlxd_controller->mlx_enq2->me_maxblk * MLX_BLKSIZE;
- s2 = (sc->mlxd_controller->mlx_enq2->me_max_sg - 1) * PAGE_SIZE;
+ s2 = (sc->mlxd_controller->mlx_enq2->me_max_sg - 1) * 4096;
dsk->si_iosize_max = imin(s1, s2);
+ device_printf(dev, "I/O size decided to %d after comparing %d and %d\n",
+ dsk->si_iosize_max, s1, s2);
return (0);
}
Here is the driver's output on my system:
mlx0: <Mylex version 2 RAID interface> port 0x10100-0x1017f mem 0x81128100-0x8112817f irq 3 at device 12.0 on pci0
mlx0: interrupting at CIA irq 3
mlx0: DAC960P/PD, 3 channels, firmware 2.70-0-00, 4MB RAM
mlxd0: <Mylex System Drive> on mlx0
mlxd0: 8182MB (16756736 sectors) RAID 5 (online)
mlxd0: I/O size decided to 65536 after comparing 131072 and 65536
--
Dennis Lindroos <lindroos@nls.fi>
State Changed From-To: feedback->closed I applied a patch based off of the one here. Thanks for investigating this. |
I hope I made not very bad BugReport - I do it for the first time. I have AcerAltos 9000M9B with Mylex 960PL RAID 0 (8 HDDs - QUANTUM FIREBALL-TM3200S 3067MB). I've installed FreeBSD 4.1-RELEASE on fixed HDD - da0 at ahc0 (aic7880). First of all I made /pub filesystem from /stand/sysinstall. Test#0: cp /etc/passwd /pub - OK. Test#1: cp /etc/* /pub - failed. /var/log/messages(and console): /kernel: bus_dmamap_load: Too many segs! buf_len = 0x10000 /kernel: mlx0: I/O error - attempt to write beyond end of drive Than I try to make it by hand (fdisk, disklabel, newfs, mount) and receive the same result. Than I try to make 10Mb disk and receive the same result. Than I download last mlx driver sources from CVS and receive the same result. Now I can't resolve this problem. There is some system params - if you want: mylex configurator report, fdisk /dev/mlxd0 report, disklabel /dev/mlxd0s1 report, /var/log/messages. ----------------------- mylex configurator report ********************************************************************** * MYLEX Disk Array Controller - Configuration Utility * * Version 4.78-08 * ********************************************************************** CONFIGURATION INFORMATION OF : ============================== 2 Channel - 15 Target DAC960PL #1 Firmware version 3.51-0-4 Auto Rebuild Management : Enabled Storage Works Fault Management : Enabled Rebuild/Add Capacity Rate : 50 Stripe Size : 32K Cache Segment Size : 32K SCSI Transfer Parameters ------------------------ Data Transfer Rate for channel 0: 5 MHz Data Bus Width for channel 0 : 8 Bit Command Tags for channel 0 : Disabled Data Transfer Rate for channel 1: 5 MHz Data Bus Width for channel 1 : 8 Bit Command Tags for channel 1 : Disabled Startup Parameters ------------------ Spin Up Option : Automatic Number of devices per spin up : 4 Length of delay : 6 seconds Sequence delay : 6 seconds PHYSICAL PACK INFORMATION : =========================== Number of Packs = 1 Pack 0 : [0:0] [0:1] [0:2] [0:3] [1:0] [1:1] [1:2] [1:3] SYSTEM DRIVE INFORMATION : ========================== Number of System Drives = 1 Sys Drv# Phy. Size Raid Level Eff. Size Write Policy State ======== ========= ========== ========= ============ ===== 0 24536 MB 0 24536 MB Write Thru Online Device Information ------------------ Chnl/Targ Vendor Model Version Size State --------- ------ ----- ------- ---- ----- 0-0 QUANTUM FIREBALL_TM3200S 300N 3067 MB Online 0-1 QUANTUM FIREBALL_TM3200S 300N 3067 MB Online 0-2 QUANTUM FIREBALL_TM3200S 300N 3067 MB Online 0-3 QUANTUM FIREBALL_TM3200S 300N 3067 MB Online 1-0 QUANTUM FIREBALL_TM3200S 300N 3067 MB Online 1-1 QUANTUM FIREBALL_TM3200S 300N 3067 MB Online 1-2 QUANTUM FIREBALL_TM3200S 300N 3067 MB Online 1-3 QUANTUM FIREBALL_TM3200S 300N 3067 MB Online ----------------------- fdisk /dev/mlxd0 report ******* Working on device /dev/rmlxd0 ******* parameters extracted from in-core disklabel are: cylinders=12268 heads=128 sectors/track=32 (4096 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=12268 heads=128 sectors/track=32 (4096 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 32, size 65504 (31 Meg), flag 80 (active) beg: cyl 0/ sector 1/ head 1; end: cyl 15/ sector 32/ head 127 The data for partition 2 is: <UNUSED> The data for partition 3 is: <UNUSED> The data for partition 4 is: <UNUSED> ----------------------- disklabel /dev/mlxd0s1 report # /dev/mlxd0s1: type: ESDI disk: mlxd0s1 label: flags: bytes/sector: 512 sectors/track: 32 tracks/cylinder: 128 sectors/cylinder: 4096 cylinders: 15 sectors/unit: 65504 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 10240 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 2*) c: 65504 0 unused 0 0 # (Cyl. 0 - 15*) ----------------------- /var/log/messages Sep 12 16:07:09 ftp /kernel: Copyright (c) 1992-2000 The FreeBSD Project. Sep 12 16:07:10 ftp /kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 Sep 12 16:07:10 ftp /kernel: The Regents of the University of California. All rights reserved. Sep 12 16:07:10 ftp /kernel: FreeBSD 4.1-RELEASE #0: Tue Sep 12 15:53:57 MSD 2000 Sep 12 16:07:10 ftp /kernel: root@ftp.runnet.ru:/usr/src/sys/compile/FTP Sep 12 16:07:10 ftp /kernel: Timecounter "i8254" frequency 1193182 Hz Sep 12 16:07:10 ftp /kernel: CPU: Pentium Pro (198.95-MHz 686-class CPU) Sep 12 16:07:10 ftp /kernel: Origin = "GenuineIntel" Id = 0x619 Stepping = 9 Sep 12 16:07:10 ftp /kernel: Features=0xfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV> Sep 12 16:07:10 ftp /kernel: real memory = 134217728 (131072K bytes) Sep 12 16:07:11 ftp /kernel: config> di ata1 Sep 12 16:07:11 ftp /kernel: config> di ata0 Sep 12 16:07:11 ftp /kernel: config> q Sep 12 16:07:11 ftp /kernel: avail memory = 127811584 (124816K bytes) Sep 12 16:07:11 ftp /kernel: Programming 16 pins in IOAPIC #0 Sep 12 16:07:11 ftp /kernel: EISA INTCONTROL = 0000ce20 Sep 12 16:07:11 ftp /kernel: IOAPIC #0 intpin 2 -> irq 0 Sep 12 16:07:11 ftp /kernel: FreeBSD/SMP: Multiprocessor motherboard Sep 12 16:07:11 ftp /kernel: cpu0 (BSP): apic id: 0, version: 0x00040011, at 0xfee00000 Sep 12 16:07:11 ftp /kernel: cpu1 (AP): apic id: 1, version: 0x00040011, at 0xfee00000 Sep 12 16:07:11 ftp /kernel: io0 (APIC): apic id: 15, version: 0x000f0011, at 0xfec00000 Sep 12 16:07:11 ftp /kernel: Preloaded elf kernel "kernel" at 0xc02b1000. Sep 12 16:07:11 ftp /kernel: Preloaded userconfig_script "/boot/kernel.conf" at 0xc02b109c. Sep 12 16:07:11 ftp /kernel: Pentium Pro MTRR support enabled Sep 12 16:07:12 ftp /kernel: npx0: <math processor> on motherboard Sep 12 16:07:12 ftp /kernel: npx0: INT 16 interface Sep 12 16:07:12 ftp /kernel: pcib0: <Host to PCI bridge> on motherboard Sep 12 16:07:12 ftp /kernel: pci0: <PCI bus> on pcib0 Sep 12 16:07:12 ftp /kernel: isab0: <Intel 82375EB PCI-EISA bridge> at device 11.0 on pci0 Sep 12 16:07:12 ftp /kernel: eisa0: <EISA bus> on isab0 Sep 12 16:07:12 ftp /kernel: mainboard0: <ACR1d21 (System Board)> on eisa0 slot 0 Sep 12 16:07:12 ftp /kernel: isa0: <ISA bus> on isab0 Sep 12 16:07:12 ftp /kernel: pcib1: <DEC 21052 PCI-PCI bridge> at device 12.0 on pci0 Sep 12 16:07:12 ftp /kernel: pci1: <PCI bus> on pcib1 Sep 12 16:07:12 ftp /kernel: mlx0: <Mylex version 3 RAID interface> port 0x8000-0x807f mem 0x9100000-0x910007f irq 11 at device 5.0 on pci1 Sep 12 16:07:12 ftp /kernel: mlx0: DAC960PL, 2 channels, firmware 3.52-0-02, 8MB RAM Sep 12 16:07:12 ftp /kernel: mlxd0: <Mylex System Drive> on mlx0 Sep 12 16:07:12 ftp /kernel: mlxd0: 24536MB (50249728 sectors) RAID 0 (online) Sep 12 16:07:12 ftp /kernel: de0: <Digital 21041 Ethernet> port 0x9000-0x907f mem 0x9200000-0x920007f irq 5 at device 13.0 on pci0 Sep 12 16:07:12 ftp /kernel: de0: COMPEX unknown 21041 [10Mb/s] pass 1.1 Sep 12 16:07:12 ftp /kernel: de0: address 00:80:48:e8:9e:2c Sep 12 16:07:12 ftp /kernel: pci0: <unknown card> (vendor=0x1022, dev=0x2000) at 14.0 irq 10 Sep 12 16:07:12 ftp /kernel: pci0: <ATI Mach64-CT graphics accelerator> at 15.0 irq 9 Sep 12 16:07:12 ftp /kernel: ahc0: <Adaptec aic7880 Ultra SCSI adapter> port 0x9400-0x94ff mem 0x9201000-0x9201fff irq 15 at device 16.0 on pci0 Sep 12 16:07:12 ftp /kernel: ahc0: Using left over BIOS settings Sep 12 16:07:12 ftp /kernel: ahc0: aic7880 Wide Channel A, SCSI Id=7, 16/255 SCBs Sep 12 16:07:12 ftp /kernel: fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 Sep 12 16:07:12 ftp /kernel: fdc0: FIFO enabled, 8 bytes threshold Sep 12 16:07:12 ftp /kernel: fd0: <1440-KB 3.5" drive> on fdc0 drive 0 Sep 12 16:07:12 ftp /kernel: atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0 Sep 12 16:07:12 ftp /kernel: atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0 Sep 12 16:07:12 ftp /kernel: kbd0 at atkbd0 Sep 12 16:07:12 ftp /kernel: vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Sep 12 16:07:12 ftp /kernel: sc0: <System console> at flags 0x100 on isa0 Sep 12 16:07:12 ftp /kernel: sc0: VGA <16 virtual consoles, flags=0x300> Sep 12 16:07:12 ftp /kernel: sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 Sep 12 16:07:12 ftp /kernel: sio0: type 16550A Sep 12 16:07:12 ftp /kernel: sio1 at port 0x2f8-0x2ff irq 3 on isa0 Sep 12 16:07:12 ftp /kernel: sio1: type 16550A Sep 12 16:07:12 ftp /kernel: ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0 Sep 12 16:07:12 ftp /kernel: ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode Sep 12 16:07:12 ftp /kernel: lpt0: <Printer> on ppbus0 Sep 12 16:07:12 ftp /kernel: lpt0: Interrupt-driven port Sep 12 16:07:12 ftp /kernel: de0: enabling 10baseT port Sep 12 16:07:12 ftp /kernel: APIC_IO: Testing 8254 interrupt delivery Sep 12 16:07:12 ftp /kernel: APIC_IO: routing 8254 via IOAPIC #0 intpin 2 Sep 12 16:07:12 ftp /kernel: Waiting 15 seconds for SCSI devices to settle Sep 12 16:07:12 ftp /kernel: SMP: AP CPU #1 Launched! Sep 12 16:07:12 ftp /kernel: Mounting root from ufs:/dev/da0s1a Sep 12 16:07:13 ftp /kernel: da0 at ahc0 bus 0 target 0 lun 0 Sep 12 16:07:13 ftp /kernel: da0: <MICROP 4110-09NB_Nov18F TN0F> Fixed Direct Access SCSI-2 device Sep 12 16:07:13 ftp /kernel: da0: 10.000MB/s transfers (10.000MHz, offset 15), Tagged Queueing Enabled Sep 12 16:07:13 ftp /kernel: da0: 1002MB (2053880 512 byte sectors: 64H 32S/T 1002C) Sep 12 16:07:23 ftp login: ROOT LOGIN (root) ON ttyv1 Sep 12 16:12:42 ftp /kernel: bus_dmamap_load: Too many segs! buf_len = 0x10000 Sep 12 16:12:42 ftp /kernel: mlx0: I/O error - attempt to write beyond end of drive Sep 12 16:13:10 ftp /kernel: bus_dmamap_load: Too many segs! buf_len = 0x10000 How-To-Repeat: Install 4.1-RELEASE. Make filesystem on Mylex 960PL RAID 0. Write to this filesystem many files.