Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Feb 2013 16:42:46 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        freebsd-fs@FreeBSD.org
Subject:   on zfs, read errors are considered write errors?
Message-ID:  <20130220004246.GL55866@funkthat.com>

next in thread | raw e-mail | index | archive | help
So, I've been trying to track down how ZFS handles errors and stuff
to make sure it's sane before I try to fix geli, but I've been getting
some wierd results...  Apparently, zfs thinks that read errors are
WRITE errors, or even CKSUM errors (this is understandable, as invalid
data would cause a cksum error)...  I don't know where in the zfs code
that error accounting is happening, but here is my test:
touch /root/disk{1,2}
mdconfig -a -t vnode -f /root/disk1 -s 96m
mdconfig -a -t vnode -f /root/disk2 -s 96m
gnop create md0 
gnop create md1 
zpool create ztest mirror md0.nop md1.nop
cd /ztest
for i in `jot 1000 1`; do echo $i > $i; done
cd /
zpool export ztest
gnop configure -r 0 md0.nop
zpool import ztest
zpool status
gnop configure -r 30 md0.nop
cat /ztest/*
zpool status
zpool scrub
zpool status

And I get results like:
[root@carbon /]# zpool status
  pool: ztest
 state: ONLINE
status: One or more devices has experienced an unrecoverable error.  An
        attempt was made to correct the error.  Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
        using 'zpool clear' or replace the device with 'zpool replace'.
   see: http://illumos.org/msg/ZFS-8000-9P
  scan: scrub repaired 239K in 0h0m with 0 errors on Tue Feb 19 16:36:37 2013
config:

        NAME         STATE     READ WRITE CKSUM
        ztest        ONLINE       0     0     0
          mirror-0   ONLINE       0     0     0
            md0.nop  ONLINE       5   277   422
            md1.nop  ONLINE       0     0     0

errors: No known data errors

I'm patches that changes gnop to log the errors on debug of 1 instead
of 2 (which also logs all requests), and the logs verify that only errors
to READ requests are returned...

Any clues why read errors would cause write errors?

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



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