From owner-freebsd-geom@FreeBSD.ORG Mon Aug 20 01:38:25 2007 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADAEE16A500 for ; Mon, 20 Aug 2007 01:38:25 +0000 (UTC) (envelope-from hg@queue.to) Received: from pickle.queue.to (pickle.queue.to [71.180.69.18]) by mx1.freebsd.org (Postfix) with ESMTP id 47C2B13C461 for ; Mon, 20 Aug 2007 01:38:23 +0000 (UTC) (envelope-from hg@queue.to) Received: (qmail 69253 invoked from network); 19 Aug 2007 21:38:22 -0400 Received: from cally.queue.to (172.16.0.6) by pickle.queue.to with ESMTP; 19 Aug 2007 21:38:22 -0400 Message-ID: <46C8F08E.4090108@queue.to> Date: Sun, 19 Aug 2007 21:38:22 -0400 From: Howard Goldstein User-Agent: Thunderbird 2.0.0.6 (X11/20070802) MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: graid5, 3 consumers, unaligned access X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 01:38:25 -0000 Due to a bug in the twe driver I've noticed quite a few accesses to the graid5 consumer that aren't on 512 byte boundaries. These are all 3 identical drives with identical geometries. The unaligned accesses occur when restoring (dump -0af /usr - | restore -xf - ) as well as when simply dding to the provider. Although the config below shows the consumers on the 3rd partition it's reproducable when the consumer is the entire drive (ad8 for ex, rather than in this case ad8s3, but you'll see the partition table is set up so the starting offset here is on a number of common boundaries). Any thoughts? I can make it happen at will by dd if=/dev/zero of=/graid5filesystem/tstfile bs=1m count=3000 at least a handful, probably thousands of times cally:~$ graid5 list Geom name: gr0 State: COMPLETE CALM Status: Total=3, Online=3 Type: AUTOMATIC Pending: (wqp 0 // 0) Stripesize: 131072 MemUse: 5341224 (msl 15) Newest: -1 ID: 1582456438 Providers: 1. Name: raid5/gr0 Mediasize: 620652658688 (578G) Sectorsize: 512 Mode: r2w2e3 Consumers: 1. Name: ad8s3 Mediasize: 310326460416 (289G) Sectorsize: 512 Mode: r3w3e4 DiskNo: 0 Error: No 2. Name: ad10s3 Mediasize: 310326460416 (289G) Sectorsize: 512 Mode: r3w3e4 DiskNo: 1 Error: No 3. Name: twed0s3 Mediasize: 310326460416 (289G) Sectorsize: 512 Mode: r3w3e4 DiskNo: 2 Error: No cally:~$ fdisk ad8 ******* Working on device /dev/ad8 ******* parameters extracted from in-core disklabel are: cylinders=620181 heads=16 sectors/track=63 (1008 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=620181 heads=16 sectors/track=63 (1008 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 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 514017 (250 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 509/ head 15/ sector 63 The data for partition 2 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 516096, size 18506880 (9036 Meg), flag 0 beg: cyl 512/ head 0/ sector 1; end: cyl 439/ head 15/ sector 63 The data for partition 3 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 19031040, size 606106368 (295950 Meg), flag 0 beg: cyl 448/ head 0/ sector 1; end: cyl 655/ head 15/ sector 63 The data for partition 4 is: cally$ bsdlabel raid5/gr0 # /dev/raid5/gr0: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 1212212224 0 unused 0 0 # "raw" part, don't edit d: 73256400 0 4.2BSD 8192 65536 52392 f: 1138680832 73531392 4.2BSD 8192 65536 52392 cally:~$ cally:~$ uname -a FreeBSD cally.queue.to 6.2-STABLE FreeBSD 6.2-STABLE #0: Tue Aug 14 14:20:30 EDT 2007 hg@cally.queue.to:/usr/obj/usr/src/sys/CALLY i386 cally:~$ cd /usr/src/sys/geom/raid5 cally:/usr/src/sys/geom/raid5$ ls -ltra total 120 -rw-r--r-- 1 10001 10001 5476 Jul 31 02:31 g_raid5.h -rw-r--r-- 1 10001 10001 91616 Jul 31 02:31 g_raid5.c drwxr-xr-x 2 10001 10001 512 Jul 31 02:31 ./ drwxr-xr-x 16 10001 10001 1024 Aug 10 18:44 ../ cally:/usr/src/sys/geom/raid5$