From owner-freebsd-stable@FreeBSD.ORG Sat Apr 5 03:27:52 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDE9537B401 for ; Sat, 5 Apr 2003 03:27:52 -0800 (PST) Received: from pop3.psconsult.nl (ps227.psconsult.nl [213.222.19.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6718043F93 for ; Sat, 5 Apr 2003 03:27:51 -0800 (PST) (envelope-from paul@pop3.psconsult.nl) Received: (from paul@localhost) by pop3.psconsult.nl (8.9.2/8.9.2) id NAA02536 for freebsd-stable@freebsd.org; Sat, 5 Apr 2003 13:27:49 +0200 (CEST) (envelope-from paul) Date: Sat, 5 Apr 2003 13:27:49 +0200 From: Paul Schenkeveld To: FreeBSD Stable Message-ID: <20030405132749.A2167@psconsult.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i Subject: Weird EINVAL readig *large* file X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2003 11:27:53 -0000 Hi All, I'm about to clean and re-initialize a Maxtor 160GB disk that shows a weird problem but I think I've found a bug in RELENG_4_7 somewhere so if preserving my disk can help conquer one more bug I'm happy to wait a couple of days and help solve that bug. Here's the story: While upgrading from 4.3-STABLE to 4.7p4 and at the same time reorganizing my vinum volumes I copied several (unmounted) vinum volumes (ufs filesystems) to a large IDE disk using dd(1) in order to be able to recreate my vinum volumes. When I try to read back one of the saved images containing a 16GB filesystem, I get EINVAL somewhere half way the file. I first discoverd this when I tried "sum /dev/vinum/arch" but this happens with every command I use to read the file, even with a small C program I wrote to just read the file in 8KB chunks to verify this error. The read(2) manual page gives the following explanation for EINVAL: [EINVAL] The pointer associated with d was negative. which I am certain was absolutely not the case, at least in my small test program. There is no media error report in /var/log/messages (but if there were I would expect EIO and not EINVAL). A full fsck of the filesystem shows no error at all so either the block allocations in the inode and indirect blocks are ok or fsck fails to find out what's wrong. Another image copy I made to another disk (same Maxtor model, connected to the second ATA channel of the same controller) reads fine though. The IDE disk is a Maxtor 160GB disk: ad4: 156334MB [317632/16/63] at ata2-master UDMA133 Connected to a Promise ATA133 controller: atapci0: port 0x3000-0x300f, 0x3010-0x3013,0x3018-0x301f,0x3014-0x3017,0x3020-0x3027 mem 0xf4200000-0xf4203fff irq 11 at device 7.0 on pci2 The fdisk entry for the disk is: /dev/ad4: 317632 cyl 16 hd 63 sec Part Start Size Type Flags 1: 63 320172993 0xa5 0x80 The disklabel reads: # /dev/ad4s1c: ... 8 partitions: # size offset fstype [fsize bsize bps/cpg] b: 265 0 swap # (Cyl. 0 - 0*) c: 320172993 0 unused 0 0 # (Cyl. 0 - 317631*) e: 320172728 265 vinum # (Cyl. 0*- 317631*) and the vinum objects on this disk: D disk10 State: up Device /dev/ad4s1e Avail: 0/156334 MB (0%) V arch State: up Plexes: 1 Size: 152 GB P arch.p0 S State: up Subdisks: 1 Size: 152 GB S arch.p0.s0 State: up PO: 0 B Size: 152 GB All was done on an Intel L440GX based server (2x 700MHz P3) running a 4.7p4 kernel (and userland): @(#)FreeBSD 4.7-RELEASE-p4 #2: Fri Feb 21 16:18:45 CET 2003 but later I upgraded to 4.7p10 and the results are the same. Regards, Paul Schenkeveld, Consultant PSconsult ICT Services BV