Bug 241069 - zfs: scrub does not detect all errors on active spares
Summary: zfs: scrub does not detect all errors on active spares
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-fs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-05 00:18 UTC by Alan Somers
Modified: 2019-10-07 20:19 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer 2019-10-05 00:18:14 UTC
This is a partial regression of https://www.illumos.org/issues/8473, which I fixed in illumos rev 554675e (FreeBSD 323813).  Previously, ZFS scrub would never detect errors on active spares.  Now, it detects some of them, but not all.  The problem can be reproduced with the hotspare_test:hotspare_scrub_002_pos test from the ZFS test suite, or by these commands:

truncate -s 64m /tmp/a /tmp/b /tmp/c /tmp/d
sudo zpool create -f testpool raidz1 /tmp/a /tmp/b /tmp/c spare /tmp/d
sudo zpool replace testpool /tmp/a /tmp/d
/bin/dd if=/dev/zero bs=1024k count=63 oseek=1 conv=notrunc of=/tmp/d
sync
sudo zpool scrub testpool
zpool status testpool # Will show only a few errors
sudo zpool offline testpool /tmp/a
sudo zpool scrub testpool
zpool status testpool # Will show new errors!!!
Comment 1 commit-hook freebsd_committer 2019-10-07 20:19:27 UTC
A commit references this bug:

Author: asomers
Date: Mon Oct  7 20:19:06 UTC 2019
New revision: 353288
URL: https://svnweb.freebsd.org/changeset/base/353288

Log:
  ZFS: mark hotspare_scrub_002_pos as an expected failure

  "zpool scrub" doesn't detect all errors on active spares in raidz arrays

  PR:		241069
  MFC after:	2 weeks
  Sponsored by:	Axcient

Changes:
  head/tests/sys/cddl/zfs/tests/hotspare/hotspare_test.sh