Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jun 2004 18:47:14 -0700
From:      "Benjamin P. Keating" <bkeating@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   fsck'ing a Vinum RAID5 volume (and a stale drive)
Message-ID:  <1d54d54404062518474bbb3494@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
This is a good one.

$ uname -a
FreeBSD 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct  9 15:08:34 GMT
2002     root@builder.freebsdmall.com:/usr/obj/usr/src/sys/GENERIC 
i386

First I'll explain the stale/degraded issue. Then ask about fsck on a
raid5 vinum. My goal is to have the vinum volume check out OK with
fsck and to do a 'vinum list' and have 'State: up' all the way down
the list. This is a RAID5 holding backup copies of other servers.

----

$ vinum list
7 drives:
D a                     State: up       Device /dev/ad4s1f      Avail:
0/114473 MB (0%)
D b                     State: up       Device /dev/ad6s1f      Avail:
0/114473 MB (0%)
D c                     State: up       Device /dev/ad8s1f      Avail:
0/114473 MB (0%)
D d                     State: up       Device /dev/ad10s1f     Avail:
0/114473 MB (0%)
D e                     State: up       Device /dev/ad12s1f     Avail:
0/114473 MB (0%)
D f                     State: up       Device /dev/ad14s1f     Avail:
0/114473 MB (0%)
D g                     State: up       Device /dev/ad16s1f     Avail:
0/114473 MB (0%)

1 volumes:
V backup                State: up       Plexes:       1 Size:        670 GB

1 plexes:
P backup.p0          R5 State: degraded       Subdisks:     7 Size:   
    670 GB

7 subdisks:
S backup.p0.s0          State: up       PO:        0  B Size:        111 GB
S backup.p0.s1          State: up       PO:      384 kB Size:        111 GB
S backup.p0.s2          State: up       PO:      768 kB Size:        111 GB
S backup.p0.s3          State: stale       PO:     1152 kB Size:        111 GB
S backup.p0.s4          State: up       PO:     1536 kB Size:        111 GB
S backup.p0.s5          State: up       PO:     1920 kB Size:        111 GB
S backup.p0.s6          State: up       PO:     2304 kB Size:        111 GB


I've found on the net that I can switch the state by doing:

$ vinum setstate up backup.p0 backup.p0.s3

and it does indeed bring the state back up so then it was recommneded to

$ vinum saveconfig

I rebooted, the state is "up" so I unmounted the volume to fsck it. Is
this approach correct? does this do anything productive or just forces
the state label to change and do nothing to the drives? I don't feel
confident that it did anything and Im having a VERY hard time finding
documentation on this.

----

the vinum vol is unmounted, so now I do a :

$ fsck -n /dev/vinum/backup 

and get tons of bad news scrolling up the screen. Lots of  this:


%<-------------------------------

bigbang:root> fsck -n /dev/vinum/backup 
** /dev/vinum/backup (NO WRITE)
** Last Mounted on /backup
** Phase 1 - Check Blocks and Sizes
529516494 BAD I=12
31580655 BAD I=12
-588350257 BAD I=12
1849227449 BAD I=12
490256604 BAD I=12
1896046100 BAD I=12
1065221887 BAD I=12
422657855 BAD I=12
1511116800 BAD I=12
1663396533 BAD I=12
-13685115 BAD I=12
EXCESSIVE BAD BLKS I=12
CONTINUE? yes

INCORRECT BLOCK COUNT I=12 (80557504 should be 262656)
CORRECT? no

INCORRECT BLOCK COUNT I=76903513 (416 should be 228)
CORRECT? no

PARTIALLY TRUNCATED INODE I=76903514
SALVAGE? no

PARTIALLY TRUNCATED INODE I=76903515
SALVAGE? no

-116589821 BAD I=76903515
-112723056 BAD I=76903515
-98501815 BAD I=76903515
-99813036 BAD I=76903515
-131467519 BAD I=76903515
-168168055 BAD I=76903515
-189794987 BAD I=76903515
-189532554 BAD I=76903515
-169084920 BAD I=76903515
-143787653 BAD I=76903515
-122160433 BAD I=76903515
EXCESSIVE BAD BLKS I=76903515
CONTINUE? yes

INCORRECT BLOCK COUNT I=76903515 (1056 should be 368)
CORRECT? no

PARTIALLY TRUNCATED INODE I=76903516
SALVAGE? no

%<-------------------------------


Im assuming I'll want to answer yes to at least some of those. Can I
say yes to all of them? What errors should I say no to? I have no idea
whats bad bad and whats correctable.

Now. because this is a raid5 volume, are some of these fsck prompts
false  positives? ie; fsck is giving a error but really it's fine as
it's raid5?



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