Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scrub never completes on empty pool with special vdev #8694

Closed
markwiederspahn opened this issue Apr 30, 2019 · 2 comments · Fixed by #10106
Closed

scrub never completes on empty pool with special vdev #8694

markwiederspahn opened this issue Apr 30, 2019 · 2 comments · Fixed by #10106
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@markwiederspahn
Copy link

System information

Type Version/Name
Distribution Name Centos
Distribution Version 6.10
Linux Kernel 2.6.32-754.12.1
Architecture X86_64
ZFS Version 0.8.0-rc4
SPL Version 0.8.0-rc4

Describe the problem you're observing

scrub acts oddly on a newly created pool with a "special" vdev.

Describe how to reproduce the problem

zpool create -f xx sdab special sdac
zpool scrub xx
zpool iostat -v xx 5
observe continuous writing to sdac, lower rate of writing to sdab.

touch /xx/junk
observe scrub finishes. Under some unknown conditions, data must be written to "junk" to have the scrub complete. Often just the empty file suffices.

The problem doesn't occur if any files exist at scrub start.

Include any warning/errors/backtraces from the system logs

@behlendorf behlendorf added the Type: Defect Incorrect behavior (e.g. crash, hang) label May 2, 2019
@behlendorf
Copy link
Contributor

@markwiederspahn thanks for reporting this. I was able to reproduce this issue using the steps described.

@amotin
Copy link
Member

amotin commented Mar 9, 2020

This PR fixes this issue: #10106

@amotin amotin linked a pull request Mar 10, 2020 that will close this issue
12 tasks
behlendorf pushed a commit that referenced this issue Mar 12, 2020
Attempt to run scrub or resilver on a new pool containing only special
allocations (special vdev added on creation) caused infinite loop
because of dsl_scan_should_clear() limiting memory usage to 5% of pool
size, which it calculated accounting only normal allocation class.

Addition of special and just in case dedup classes fixes the issue.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #10106 
Closes #8694
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Apr 15, 2020
Attempt to run scrub or resilver on a new pool containing only special
allocations (special vdev added on creation) caused infinite loop
because of dsl_scan_should_clear() limiting memory usage to 5% of pool
size, which it calculated accounting only normal allocation class.

Addition of special and just in case dedup classes fixes the issue.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes openzfs#10106 
Closes openzfs#8694
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Apr 22, 2020
Attempt to run scrub or resilver on a new pool containing only special
allocations (special vdev added on creation) caused infinite loop
because of dsl_scan_should_clear() limiting memory usage to 5% of pool
size, which it calculated accounting only normal allocation class.

Addition of special and just in case dedup classes fixes the issue.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes openzfs#10106 
Closes openzfs#8694
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Apr 22, 2020
Attempt to run scrub or resilver on a new pool containing only special
allocations (special vdev added on creation) caused infinite loop
because of dsl_scan_should_clear() limiting memory usage to 5% of pool
size, which it calculated accounting only normal allocation class.

Addition of special and just in case dedup classes fixes the issue.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes openzfs#10106 
Closes openzfs#8694
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Apr 28, 2020
Attempt to run scrub or resilver on a new pool containing only special
allocations (special vdev added on creation) caused infinite loop
because of dsl_scan_should_clear() limiting memory usage to 5% of pool
size, which it calculated accounting only normal allocation class.

Addition of special and just in case dedup classes fixes the issue.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes openzfs#10106 
Closes openzfs#8694
tonyhutter pushed a commit that referenced this issue May 12, 2020
Attempt to run scrub or resilver on a new pool containing only special
allocations (special vdev added on creation) caused infinite loop
because of dsl_scan_should_clear() limiting memory usage to 5% of pool
size, which it calculated accounting only normal allocation class.

Addition of special and just in case dedup classes fixes the issue.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #10106 
Closes #8694
jsai20 pushed a commit to jsai20/zfs that referenced this issue Mar 30, 2021
Attempt to run scrub or resilver on a new pool containing only special
allocations (special vdev added on creation) caused infinite loop
because of dsl_scan_should_clear() limiting memory usage to 5% of pool
size, which it calculated accounting only normal allocation class.

Addition of special and just in case dedup classes fixes the issue.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes openzfs#10106 
Closes openzfs#8694
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants