From cjohnson@camelot.com  Mon Apr  3 13:51:22 2000
Return-Path: <cjohnson@camelot.com>
Received: from galahad.camelot.com (Galahad.Camelot.com [192.55.203.135])
	by hub.freebsd.org (Postfix) with ESMTP id 9DD2B37BECD
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  3 Apr 2000 13:49:55 -0700 (PDT)
	(envelope-from cjohnson@camelot.com)
Received: by galahad.camelot.com (Postfix, from userid 2455)
	id BFD9212C30; Mon,  3 Apr 2000 16:49:10 -0400 (EDT)
Message-Id: <20000403204910.BFD9212C30@galahad.camelot.com>
Date: Mon,  3 Apr 2000 16:49:10 -0400 (EDT)
From: cjohnson@camelot.com
Reply-To: cjohnson@camelot.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: RAID5 with crashed disk corrupts filesystem.
X-Send-Pr-Version: 3.2

>Number:         17776
>Category:       kern
>Synopsis:       RAID5 with crashed disk corrupts filesystem.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    grog
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr  3 14:00:01 PDT 2000
>Closed-Date:    Fri May 25 17:13:36 PDT 2001
>Last-Modified:  Fri May 25 17:14:03 PDT 2001
>Originator:     Christopher T. Johnson
>Release:        FreeBSD 4.0-RELEASE i386
>Organization:
Paladin Software
>Environment:
Dual processor P233MMX running FreeBSD 4.0-Release.  No IDE.  Two scsi chains.

>Description:

I've been having trouble with my filesystems becoming corrupt and wanted to
verify if it was vinum RAID5 or R4.0.

Four disks in RAID5 configuration (VINUM config included)
vinum start
vinum init myraid.p0
newfs -v /dev/vinum/myraid
mount /dev/vinum/myraid /release
cd /release
restore -rf /dev/rsa0
sync
sync
su-2.03# fsck -n /release
** /dev/vinum/myraid (NO WRITE)
** Last Mounted on /release
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
58609 files, 4357955 used, 3908728 free (6704 frags, 487753 blocks, 0.1% fragmentation)
cd /
umount /release
vinum
vinum -> list
5 drives:
D drv3                  State: up       Device /dev/da1s1e      Avail: 1372/4149 MB (33%)
D drv1                  State: up       Device /dev/da3s1a      Avail: 0/2777 MB (0%)
D drv2                  State: up       Device /dev/da4s1a      Avail: 0/2777 MB (0%)
D drv4                  State: up       Device /dev/da5s1e      Avail: 0/2014 MB (0%)
D drv5                  State: up       Device /dev/da6s1e      Avail: 0/2776 MB (0%)

2 volumes:
V quick                 State: up       Plexes:       1 Size:       2013 MB
V myraid                State: up       Plexes:       1 Size:       8329 MB

2 plexes:
P quick.p0            C State: up       Subdisks:     1 Size:       2013 MB
P myraid.p0          R5 State: up       Subdisks:     4 Size:       8329 MB

5 subdisks:
S quick.p0.s0           State: up       PO:        0  B Size:       2013 MB
S myraid.p0.s0          State: up       PO:        0  B Size:       2776 MB
S myraid.p0.s1          State: up       PO:      128 kB Size:       2776 MB
S myraid.p0.s2          State: up       PO:      256 kB Size:       2776 MB
S myraid.p0.s3          State: up       PO:      384 kB Size:       2776 MB
vinum -> ld
D drv3                  State: up       Device /dev/da1s1e      Avail: 1372/4149 MB (33%)
D drv1                  State: up       Device /dev/da3s1a      Avail: 0/2777 MB (0%)
D drv2                  State: up       Device /dev/da4s1a      Avail: 0/2777 MB (0%)
D drv4                  State: up       Device /dev/da5s1e      Avail: 0/2014 MB (0%)
D drv5                  State: up       Device /dev/da6s1e      Avail: 0/2776 MB (0%)
#
# Stop the DRIVE which crashes the subdisk.
#

vinum -> stop -f drv5
vinum -> list
5 drives:
D drv3                  State: up       Device /dev/da1s1e      Avail: 1372/4149 MB (33%)
D drv1                  State: up       Device /dev/da3s1a      Avail: 0/2777 MB (0%)
D drv2                  State: up       Device /dev/da4s1a      Avail: 0/2777 MB (0%)
D drv4                  State: up       Device /dev/da5s1e      Avail: 0/2014 MB (0%)
D drv5                  State: down     Device /dev/da6s1e      Avail: 0/2776 MB (0%)

2 volumes:
V quick                 State: up       Plexes:       1 Size:       2013 MB
V myraid                State: up       Plexes:       1 Size:       8329 MB

2 plexes:
P quick.p0            C State: up       Subdisks:     1 Size:       2013 MB
P myraid.p0          R5 State: degraded Subdisks:     4 Size:       8329 MB

5 subdisks:
S quick.p0.s0           State: up       PO:        0  B Size:       2013 MB
S myraid.p0.s0          State: up       PO:        0  B Size:       2776 MB
S myraid.p0.s1          State: up       PO:      128 kB Size:       2776 MB
S myraid.p0.s2          State: up       PO:      256 kB Size:       2776 MB
S myraid.p0.s3          State: crashed  PO:      384 kB Size:       2776 MB
vinum -> quit
su-2.03# fsck -n /release
** /dev/vinum/myraid (NO WRITE)
** Last Mounted on /release
** Phase 1 - Check Blocks and Sizes
INCORRECT BLOCK COUNT I=190907 (304 should be 208)
CORRECT? no

INCORRECT BLOCK COUNT I=706619 (240 should be 208)
CORRECT? no

PARTIALLY TRUNCATED INODE I=777784
SALVAGE? no

INCORRECT BLOCK COUNT I=1047619 (416 should be 208)
CORRECT? no

INCORRECT BLOCK COUNT I=1095394 (592 should be 208)
CORRECT? no

1936 DUP I=1103333
1937 DUP I=1103333
1938 DUP I=1103333
1939 DUP I=1103333
1940 DUP I=1103333
1941 DUP I=1103333
1942 DUP I=1103333
1943 DUP I=1103333
1936 DUP I=1103333
1937 DUP I=1103333
1938 DUP I=1103333
EXCESSIVE DUP BLKS I=1103333
CONTINUE? yes

INCORRECT BLOCK COUNT I=1103333 (752 should be 228)
CORRECT? no

PARTIALLY TRUNCATED INODE I=1158675
SALVAGE? no

3616 DUP I=1158675
3617 DUP I=1158675
3618 DUP I=1158675
3619 DUP I=1158675
3620 DUP I=1158675
3621 DUP I=1158675
3622 DUP I=1158675
3623 DUP I=1158675
3616 DUP I=1158675
3617 DUP I=1158675
3618 DUP I=1158675
EXCESSIVE DUP BLKS I=1158675
CONTINUE? yes

INCORRECT BLOCK COUNT I=1158675 (912 should be 228)
CORRECT? no

INCORRECT BLOCK COUNT I=1388912 (272 should be 208)
CORRECT? no
ctrl-C
---------------------------

The numbers 208 and 228 show up many many times if I let this run to 
completion.

--------------------------
vinum
start drv5
stop
vinum
start
# sd goes to reborn
# plex goes to "flaky"
setstate up myraid.p0.s3
setstate up myraid.p0
#
# Yes I know this is NOT how you are suppose to do it.
#
su-2.03# !fsck
fsck -n /release
** /dev/vinum/myraid (NO WRITE)
** Last Mounted on /release
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
58609 files, 4357955 used, 3908728 free (6704 frags, 487753 blocks, 0.1% fragmentation)
camcontrol devlist
<QUANTUM FIREBALL ST4.3S 0F0C>     at scbus0 target 0 lun 0 (pass0,da0)
<EXABYTE EXB-8200 251K>            at scbus0 target 4 lun 0 (pass1,sa0)
<TOSHIBA CD-ROM XM-5701TA 0167>    at scbus0 target 5 lun 0 (pass2,cd0)
<IMS CDD2000/00 1.26>              at scbus0 target 6 lun 0 (pass3,cd1)
<FUJITSU M2954Q-512 0177>          at scbus1 target 0 lun 0 (pass4,da1)
<SEAGATE ST39140W 1281>            at scbus1 target 1 lun 0 (pass5,da2)
<SEAGATE ST43400N 1022>            at scbus1 target 2 lun 0 (pass6,da3)
<SEAGATE ST43400N 1028>            at scbus1 target 3 lun 0 (pass7,da4)
<QUANTUM FIREBALL_TM2110S 300X>    at scbus1 target 5 lun 0 (pass8,da5)
<SEAGATE ST43400N 1028>            at scbus1 target 6 lun 0 (pass9,da6)

>How-To-Repeat:

See description.

	

>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->grog 
Responsible-Changed-By: kris 
Responsible-Changed-When: Fri May 25 03:04:51 PDT 2001 
Responsible-Changed-Why:  
grog is Mr Vinum 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=17776 
State-Changed-From-To: open->closed 
State-Changed-By: grog 
State-Changed-When: Fri May 25 17:13:36 PDT 2001 
State-Changed-Why:  
PR refers to an old version of the system, bug probably fixed in 
latest version. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=17776 
>Unformatted:

Greg Lehey, 26 May 2001

This PR got lost because none of the keywords included "vinum".

Many consistency problems, hopefully all of them, have been found with
Vinum RAID-5 since 4.0-RELEASE.  If you upgrade to the latest version,
you should have no further problem.

PR closed.
