-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[thin_check] Change the policy of --clear-needs-check-flag to prevent…
… error recurrence - Disallow clearing the needs_check flag if there's any error, i.e., the metadata must be fully examined, and the result must be NO_ERROR. - Disallow combining --clear-needs-check with -m, --super-blocks-only, --skip-mappings, --override-mapping-root, or --ignore-non-fatal-errors.
- Loading branch information
Showing
3 changed files
with
43 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b278f4f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ArchWiki has a hint that (vaguely) recommends setting
--skip-mappings
together;exit(1)
here becomes a hard error. Sincethin_check
is run as part of LVM initialization this can cause boot to fail; actually I was dropped to initrd rescue shell last night. What about just printing a warning and switch off--clear-needs-check-flag
?Btw at first I thought metadata volume became full and tried some inappropriate repairing commands; those did not cause data loss but I am still in a nasty state to recover from. I'm afraid there may be other affected users.
b278f4f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologize for the inconvenience caused. Actually, using
--clear-needs-check-flag
together with--skip-mappings
is not a recommended approach, since you're not able to check for potential defects in metadata, that's why the commit was made. For now, I think the good way for most users is maintaining backward compatibility (i.e., cancel the limitation), until most distro documents are correctly updated. I've sent a pull request for this issue.Switching off
--clear-needs-check-flag
might not work as expected, since a flagged metadata will lead to read-only pool, and I'm afraid that people don't aware that--skip-mappings
causesNEEDS_CHECK
flag uncleared, even though the warning message is printed.