kern/80427: gvinum checkparity corrupts striped plexes

Stijn Hoop stijn at win.tue.nl
Thu Apr 28 01:20:15 PDT 2005


>Number:         80427
>Category:       kern
>Synopsis:       gvinum checkparity corrupts striped plexes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 28 08:20:14 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Stijn Hoop
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD pcwin002.win.tue.nl 6.0-CURRENT FreeBSD 6.0-CURRENT #12: Mon Mar 7 13:25:42 CET 2005 stijn at pcwin002.win.tue.nl:/usr/obj/usr/src/sys/PCWIN002 i386

>Description:

The gvinum command allows one to run checkparity on a striped plex. While
in itself this would be innocuous, it appears that the parity verification
actually writes bogus data to disk, leading to filesystem corruption.

>How-To-Repeat:

[stijn at pcwin002] <~> ls /local/storage
config-20050428.tar.gz                  subversion-20050428.tar.gz
foo                                     subversion-config-20050428.tar.gz
mail-20050428.tar.gz                    www-default-20050428.tar.gz
mailman-20050428.tar.gz                 www-logs-20050428.tar.gz
mysql-20050428.gz                       www-sandcat-20050428.tar.gz
postgresql                              www-whiskey-20050428.tar.gz
[stijn at pcwin002] <~> sudo umount /local/storage
[stijn at pcwin002] <~> sudo gvinum
gvinum -> lv -r
1 volume:
V storage               State: up       Plexes:       1 Size:        111 GB
P storage.p0          S State: up       Subdisks:     2 Size:        111 GB
S storage.p0.s0         State: up       D: meg          Size:         55 GB
S storage.p0.s1         State: up       D: herc         Size:         55 GB
gvinum -> checkparity -v storage.p0
Checking at 54 MB ... ^C
[stijn at pcwin002] <~> sudo fsck_ffs /dev/gvinum/storage
** /dev/gvinum/storage
Cannot find file system superblock
ioctl (GCINFO): Inappropriate ioctl for device
fsck_ffs: /dev/gvinum/storage: can't read disk label

>Fix:

Check for the correct type of plex before initiating a parity check request.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list