Reviewed by: George Wilson <george.wil...@delphix.com> Reviewed by: Matthew Ahrens <mahr...@delphix.com>
Problem When we fail to open or import a storage pool, we typically don't get any additional diagnostic information, just "no pool found" or "can not import". While there may be no additional user-consumable information, we should at least make this situation easier to debug/diagnose for developers and support. For example, we could start by using `zfs_dbgmsg()` to log each thing that we try when importing, and which things failed. E.g. "tried uberblock of txg X from label Y of device Z". Also, we could log each of the stages that we go through in `spa_load_impl()`. Solution Following the cleanup to `spa_load_impl()`, debug messages have been added to every point of failure in that function. Additionally, debug messages have been added to strategic places, such as `vdev_disk_open()`. Upstream bugs: DLPX-42049 You can view, comment on, or merge this pull request online at: https://github.com/openzfs/openzfs/pull/519 -- Commit Summary -- * 7638 Refactor spa_load_impl into several functions * DLPX-42049 SPA load/import should tell us why it failed -- File Changes -- M usr/src/uts/common/fs/zfs/spa.c (850) M usr/src/uts/common/fs/zfs/spa_misc.c (28) M usr/src/uts/common/fs/zfs/sys/spa.h (2) M usr/src/uts/common/fs/zfs/sys/vdev.h (3) M usr/src/uts/common/fs/zfs/vdev.c (76) M usr/src/uts/common/fs/zfs/vdev_disk.c (11) M usr/src/uts/common/fs/zfs/vdev_label.c (11) -- Patch Links -- https://github.com/openzfs/openzfs/pull/519.patch https://github.com/openzfs/openzfs/pull/519.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/openzfs/openzfs/pull/519 ------------------------------------------ openzfs-developer Archives: https://openzfs.topicbox.com/groups/developer/discussions/Tc5687baf3d61e0a0-M549ba24e3608ebb2a6d01b1e Powered by Topicbox: https://topicbox.com