Improve misleading error messages for ZPOOL_STATUS_CORRUPT_POOL

When devices are missing or claimed by another subsystem (e.g.
mdadm, LVM), zpool import reports "The pool metadata is corrupted"
and suggests destroying the pool. This is misleading because the
metadata is not necessarily corrupted -- it may simply be incomplete
due to inaccessible devices.

Update the status, action, and recovery messages to acknowledge
that missing devices can trigger this status, and suggest checking
device availability before resorting to pool destruction.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Longros <chris.longros@gmail.com>
Closes #18251
Closes #8236
This commit is contained in:
Christos Longros
2026-02-23 18:41:24 +01:00
committed by GitHub
parent bbf0106c6b
commit 6a717f31e6
2 changed files with 12 additions and 3 deletions
+3 -1
View File
@@ -2053,7 +2053,9 @@ zpool_explain_recover(libzfs_handle_t *hdl, const char *name, int reason,
no_info:
(void) strlcat(buf, dgettext(TEXT_DOMAIN,
"Destroy and re-create the pool from\n\ta backup source.\n"), size);
"Ensure all pool devices are present and accessible, then "
"retry the import.\n\tIf the problem persists, destroy and "
"re-create the pool from a backup source.\n"), size);
}
/*