From owner-freebsd-questions@FreeBSD.ORG Tue Sep 25 12:27:22 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86A9F16A47F for ; Tue, 25 Sep 2007 12:27:22 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id F1D2513C43E for ; Tue, 25 Sep 2007 12:27:21 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-31-60.bredband.comhem.se ([83.253.31.60]:56602 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.66) (envelope-from ) id 1Ia9VZ-0000Cn-3K for freebsd-questions@freebsd.org; Tue, 25 Sep 2007 14:27:21 +0200 Received: (qmail 6255 invoked from network); 25 Sep 2007 14:27:18 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 25 Sep 2007 14:27:18 +0200 Received: (qmail 96659 invoked by uid 1001); 25 Sep 2007 14:27:18 +0200 Date: Tue, 25 Sep 2007 14:27:18 +0200 From: Erik Trulsson To: Ted Mittelstaedt Message-ID: <20070925122718.GA96576@owl.midgard.homeip.net> Mail-Followup-To: Ted Mittelstaedt , Bart Silverstrim , Chris Boyd , freebsd-questions@freebsd.org References: <46F86CC0.7030805@chrononomicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) X-Originating-IP: 83.253.31.60 X-Scan-Result: No virus found in message 1Ia9VZ-0000Cn-3K. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Ia9VZ-0000Cn-3K 6f7d165f12d320d7b9b7d33d0fcd0ca9 Cc: Chris Boyd , freebsd-questions@freebsd.org, Bart Silverstrim Subject: Re: Update on data corruption with Tyan/3Ware X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2007 12:27:22 -0000 On Mon, Sep 24, 2007 at 10:58:20PM -0700, Ted Mittelstaedt wrote: > > > > -----Original Message----- > > From: owner-freebsd-questions@freebsd.org > > [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of Bart > > Silverstrim > > Sent: Monday, September 24, 2007 7:05 PM > > To: Ted Mittelstaedt > > Cc: Chris Boyd; freebsd-questions@freebsd.org > > Subject: Re: Update on data corruption with Tyan/3Ware > > > > > > > > > > Ted Mittelstaedt wrote: > > > 3ware is supported by the manufacturer - what do they say? > > > > > > Ted > > > > > >> -----Original Message----- > > >> From: owner-freebsd-questions@freebsd.org > > >> [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of Chris Boyd > > >> Sent: Monday, September 24, 2007 2:54 PM > > >> To: freebsd-questions@freebsd.org > > >> Subject: Update on data corruption with Tyan/3Ware > > >> > > >> > > >> Here's an update on my odd problem. Thanks to Don B for some hints > > >> that helped us start looking in a better directions. > > >> > > >> System is a Tyan Thunder K8SE motherboard with dual Opteron 250 > > >> 2.4GHz CPUs and a 3Ware 9550SX-4LP PCI Express four port RAID > > >> controller running in RAID 5. Disks are 4x Seagate 500GB SATA. 4GB > > >> Memory. > > >> > > >> Latest BIOS and firmware on mobo and RAID controller. > > >> > > >> FreeBSD 6.2 AMD64 with all patches as of 9-21-2007 > > >> > > >> We've narrowed the problem down to files that are > 4GB. Anytime we > > >> have a file that's > 4GB, we get inconsistent checksums, can't > > >> uncompress it, etc. Files < 4GB are fine. > > >> > > >> So is this a RAID controller issue? A filesystem problem? All hints > > >> appreciated. > > > > How are you getting the files on the system? Network transfer? Direct > > copy from a disc? > > > > What filesystem is it you're using? > > > > 3ware is well supported under Linux, from what I can tell and what I've > > experienced, and can't imagine that a manufacturer with a good track > > record of driver support for Linux for so long would not support FreeBSD > > as well. > > Bart and Chris, > > The problem might be that the 3ware driver uses a 32 bit "int" to > represent > a file size. The 3ware driver handles blocks on the device. It knows nothing about files or their sizes. That is the job of the filesystem which resides at a higher level in the OS. It is true that the 3ware twe(4) driver uses 32-bit ints to represent the *disk* size in number of disk-blocks. With the standard 512-byte block size this gives a maximum disk size of (512*4G==) 2TB, which is a known limitation of the twe(4) driver as well as many other disk controllers. Anyways the twa(4) driver is supposed to handle volumes larger than 2TB. (twe(4) handles 3ware 7000 and 8000-series controllers, while the twa(4) driver is for the 9000-series.) > In FreeBSD, stat() ftruncate() lseek() and > friends which are based on "strut stat" had this limitation under FreeBSD > 4.xx. > > Note line# 821 of twe_freebsd.c the driver: > > sc->twed_disk->d_maxsize = (TWE_MAX_SGL_LENGTH - 1) * PAGE_SIZE; > sc->twed_disk->d_sectorsize = TWE_BLOCK_SIZE; > sc->twed_disk->d_mediasize = TWE_BLOCK_SIZE * > (off_t)sc->twed_drive->td_size; > sc->twed_disk->d_fwsectors = sc->twed_drive->td_sectors; > > that off_t also appears elsewhere. Since off_t is a 64-bit type, and since none of that code fragment has anything to do with *file* sizes, I am not sure what your point is. > > I'm not a driver programmer but I'd bet the driver hasn't been updated > for 64 bit FreeBSD. -- Erik Trulsson ertr1013@student.uu.se