Hi. I''m working on getting the most recent ZFS to the FreeBSD''s CVS. Because of the huge amount of changes, I decided to work on ZFS regression tests, so I''m more or less sure nothing broke in the meantime. (Yes, I know about ZFS testsuite, but unfortunately I wasn''t able to port it to FreeBSD, it was just too much work. I''m afraid it is too Solaris-specific. My tests are quite different on the other hand, so we will just end up with more tests for ZFS, which is a good thing.) For now I''ve around 2000 tests covering only zpool create/add/remove/offline commands. I discovered some issues already, so I''ll share them while I''m working on the rest. 1. Inconsistent behaviour for ''zpool create'' and ''zpool add'' when handling mirror vdevs and log mirror vdevs. Different disk sizes: # zpool create test mirror <disk10GB> <disk20GB> invalid vdev specification use ''-f'' to override the following errors: mirror contains devices of different sizes # zpool create test <disk> log mirror <disk10GB> <disk20GB> # echo $? 0 # zpool status -x test pool ''test'' is healthy Mixing disks and files in the same vdev: # zpool create test <disk> <file> invalid vdev specification use ''-f'' to override the following errors: mismatched replication level: both disk and file vdevs are present # zpool create test mirror <disk> <file> invalid vdev specification use ''-f'' to override the following errors: mismatched replication level: mirror contains both files and devices # zpool create test <disk0> log <disk1> <file> # echo $? 0 # zpool create test <disk0> log mirror <disk1> <file> # echo $? 0 Mixing replication levels: # zpool create test <disk0> mirror <disk1> <disk2> invalid vdev specification use ''-f'' to override the following errors: mismatched replication level: both disk and mirror vdevs are present # zpool create test <disk0> log <disk1> mirror <disk2> <disk3> # echo $? 0 # zpool create test mirror <disk0> <disk1> mirror <disk2> <disk3> <disk4> invalid vdev specification use ''-f'' to override the following errors: mismatched replication level: both 2-way and 3-way mirror vdevs are present # zpool create test <disk0> log mirror <disk1> <disk2> mirror <disk3> <disk4> <disk5> # echo $? 0 All of the above also apply to ''zpool add'' command. 2. Bogus offline behaviour for N-way (N > 2) mirrors and RAIDZ2. For a N-way mirror vdev, one should be able to offline up to N-1 components, but it is not the case: # zpool create test mirror <disk0> <disk1> <disk2> # zpool offline test <disk0> # zpool offline test <disk1> cannot offline <disk1>: no valid replicas For a RAIDZ2 vdev, one should be able to offline up to two components, but it is also not the case: # zpool create test raidz2 <disk0> <disk1> <disk2> <disk3> # zpool offline test <disk0> # zpool offline test <disk1> cannot offline <disk1>: no valid replicas Quite surprising is that it works fine for log mirror vdevs: # zpool create test <disk0> log mirror <disk1> <disk2> <disk3> # zpool offline test <disk1> # zpool offline test <disk2> # zpool offline test <disk3> cannot offline <disk3>: no valid replicas 3. Resilver reported without a reason. # zpool create test mirror disk0 disk1 # zpool offline test disk0 # zpool export test # zpool import test # zpool status test | grep scrub scrub: resilver completed after 0h0m with 0 errors on Sun May 4 15:57:47 2008 What ZFS tries to resilver here? I verified that disk0 is not touched (which is expected behaviour). 4. Inconsistent ''zpool status'' output for log vdevs. (I''ll show only relevant parts of ''zpool status''.) # zpool create test disk0 log mirror disk1 disk2 # zpool offline test disk1 # zpool status test pool: test state: ONLINE config: NAME STATE READ WRITE CKSUM test ONLINE 0 0 0 disk0 ONLINE 0 0 0 logs ONLINE 0 0 0 mirror DEGRADED 0 0 0 disk1 OFFLINE 0 0 0 disk2 ONLINE 0 0 0 # zpool export test # zpool import test # zpool status test pool: test state: DEGRADED config: NAME STATE READ WRITE CKSUM test DEGRADED 0 0 0 disk0 ONLINE 0 0 0 logs DEGRADED 0 0 0 mirror DEGRADED 0 0 0 disk1 OFFLINE 0 0 0 disk2 ONLINE 0 0 0 Note how various states changed after export/import cycle. That''s all for now, hopefully nothing more to come:) -- Pawel Jakub Dawidek http://www.wheel.pl pjd at FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-code/attachments/20080504/b9d76d79/attachment.bin>
On Sun, May 04, 2008 at 10:10:31PM +0200, Pawel Jakub Dawidek wrote:> Hi. > > I''m working on getting the most recent ZFS to the FreeBSD''s CVS. Because > of the huge amount of changes, I decided to work on ZFS regression > tests, so I''m more or less sure nothing broke in the meantime.[...] Below you can find another inconsistency: # zpool create test mirror <disk0> <disk1> # zpool export test Remove <disk1> and put a new one in the same place. # zpool import test # zpool status test pool: test state: ONLINE status: One or more devices could not be used because the label is missing or invalid. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Replace the device using ''zpool replace''. see: http://www.sun.com/msg/ZFS-8000-4J scrub: resilver completed after 0h0m with 0 errors on Sun May 18 16:58:29 2008 config: NAME STATE READ WRITE CKSUM test ONLINE 0 0 0 mirror ONLINE 0 0 0 <disk0> ONLINE 0 0 0 3072748155191203922 UNAVAIL 0 0 0 was <disk1> errors: No known data errors Note the pool is reported to be in ONLINE state, instead of DEGRADED state. -- Pawel Jakub Dawidek http://www.wheel.pl pjd at FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-code/attachments/20080518/1c31b598/attachment.bin>
Pawel Jakub Dawidek wrote:> On Sun, May 04, 2008 at 10:10:31PM +0200, Pawel Jakub Dawidek wrote: >> Hi. >> >> I''m working on getting the most recent ZFS to the FreeBSD''s CVS. Because >> of the huge amount of changes, I decided to work on ZFS regression >> tests, so I''m more or less sure nothing broke in the meantime. > [...] >Thanks I''ve opened the following bug for this problem and the other inconsistencies you reported a few weeks ago. 6704508 zfs inconsistencies discovered by FreeBSD testsuite. -Mark> Below you can find another inconsistency: > > # zpool create test mirror <disk0> <disk1> > # zpool export test > Remove <disk1> and put a new one in the same place. > # zpool import test > # zpool status test > pool: test > state: ONLINE > status: One or more devices could not be used because the label is missing or > invalid. Sufficient replicas exist for the pool to continue > functioning in a degraded state. > action: Replace the device using ''zpool replace''. > see: http://www.sun.com/msg/ZFS-8000-4J > scrub: resilver completed after 0h0m with 0 errors on Sun May 18 16:58:29 2008 > config: > > NAME STATE READ WRITE CKSUM > test ONLINE 0 0 0 > mirror ONLINE 0 0 0 > <disk0> ONLINE 0 0 0 > 3072748155191203922 UNAVAIL 0 0 0 was <disk1> > > errors: No known data errors > > Note the pool is reported to be in ONLINE state, instead of DEGRADED state. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > zfs-code mailing list > zfs-code at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-code
On Sun, May 18, 2008 at 11:01:40PM +0200, Pawel Jakub Dawidek wrote:> On Sun, May 04, 2008 at 10:10:31PM +0200, Pawel Jakub Dawidek wrote: > > Hi. > > > > I''m working on getting the most recent ZFS to the FreeBSD''s CVS. Because > > of the huge amount of changes, I decided to work on ZFS regression > > tests, so I''m more or less sure nothing broke in the meantime. > [...] > > Below you can find another inconsistency:[...] And one more (I''m sorry for sending those in pieces, but that''s just most convinient way for me): # zpool create test <disk0> mirror <disk1> <disk2> # zpool offline test <disk1> # zpool replace test <disk1> <disk3> # zpool status test pool: test state: DEGRADED scrub: resilver completed after 0h0m with 0 errors on Thu May 22 06:58:15 2008 config: NAME STATE READ WRITE CKSUM test DEGRADED 0 0 0 <disk0> ONLINE 0 0 0 logs DEGRADED 0 0 0 mirror ONLINE 0 0 0 <disk1> ONLINE 0 0 0 <disk3> ONLINE 0 0 0 errors: No known data errors Note DEGRADED state even though all components are ONLINE. The same happens when I do the following: # zpool create test <disk0> mirror <disk1> <disk2> # zpool export test Remove <disk1> # zpool import test # zpool replace test <disk1> <disk3> zpool export/import cycle fixes the status. -- Pawel Jakub Dawidek http://www.wheel.pl pjd at FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-code/attachments/20080522/57ee05c0/attachment.bin>