-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Added error offset in zpool status #9743
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
Added error offset in zpool status #9743
Conversation
zpool status -vx outputs name of file containing corrupted error blocks if any, but says nothing about probable error blocks location. This pull request appends with file name corrupted blocks offset range to the file name. Co-authored-by: TulsiJain <[email protected]> Signed-off-by: TulsiJain <[email protected]> Signed-off-by: Kjeld Schouten-lebbing <[email protected]>
@Ornias1993 thanks for reviving this patch! I'll take a look at it. |
Looking at the Fedora 30 results:
We should see 10m_file's errors start at a 0x100000 (1MB) offset, not 0. We seek to 1MB at the file here:
|
@tonyhutter |
Codecov Report
@@ Coverage Diff @@
## master #9743 +/- ##
========================================
+ Coverage 79% 80% +<1%
========================================
Files 385 385
Lines 121299 121361 +62
========================================
+ Hits 96407 96544 +137
+ Misses 24892 24817 -75
Continue to review full report at Codecov.
|
@Ornias1993 no problem, I totally understand. I actually had a follow-on patch to @TulsiJain's patch that included printing out all the ranges of errors:
I've since updated my patch to include @TulsiJain's patch and have it here: https://github.com/tonyhutter/zfs/tree/error-ranges I'd recommend we close this PR, and I'll clean up my |
@tonyhutter I agree, that sounds best. Please do! |
My |
Rebase of the stale/inactive but complete original by @TulsiJain #8902
Including feedback/changes requested by @tonyhutter when it comes to moving test to common.run
Also removed out of scope gitignore changes.
Reviewed by: Paul Dagnelie [email protected]
Reviewed by: Tony Hutter
(See original PR #8902)
Co-authored-by: TulsiJain [email protected]
Signed-off-by: TulsiJain [email protected]
Signed-off-by: Kjeld Schouten-lebbing [email protected]
Closes #9742
Motivation, Context and Description
zpool status -vx outputs name of file containing corrupted error blocks if any, but says nothing about probable error blocks location. This pull request appends with file name corrupted blocks offset range to the file name.
Sample output Earlier
/{file_system_path}/myfile
Sample output now
/{file_system_path}/myfile errors: in 236 blocks (size 128KB), between offset 0x1002a0000 and 0x102000000 bytes
How Has This Been Tested?
Using dd command I created a file under filesystem as following
dd if=/dev/urandom of=/{file_system_path}/myfile bs=128k count=50000.
Then I directly wrote to disk device as following
dd if=/dev/urandom of=/dev/{disk_name} bs=1024 seek=10000 count=30000 conv=notrunc.
This causes file to get corrupted. Earlier it was only name of the file i.e
/{file_system_path}/myfile
now updated error message is/{file_system_path}/myfile errors: in 236 blocks (size 128KB), between offset 0x1002a0000 and 0x102000000 bytes
Also added a test cases provided by @tonyhutter. It works as follows:
Create new file
Add checksum error using zinject
Read using dd
Verifies that filename is logged in zpool status -vx command
Types of changes
Checklist:
Signed-off-by
.