Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Aug 2007 21:38:22 -0400
From:      Howard Goldstein <hg@queue.to>
To:        freebsd-geom@freebsd.org
Subject:   graid5, 3 consumers, unaligned access
Message-ID:  <46C8F08E.4090108@queue.to>

next in thread | raw e-mail | index | archive | help
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:
<UNUSED>

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$





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46C8F08E.4090108>