A faulted pool with only unavailable vdevs triggers assertion failure in libzfs

Review Request #106 - Created Oct. 19, 2015 and updated

Information
Dan Vatca
illumos-gate
Reviewers
general

The problem is that we are asserting that we must have at least some features enabled. But that is not the case when the pool is faulted and we still have it in /etc/zfs/zpool.cache.
When SPA loads it from the cache, it initialises the features structure to NULL, but will never get a chance to actually write anything (all vdevs are unavailable), so it leads to this situation.
The same issue appears when we run zpool upgrade related commands. I believe this is also the root cause for issue #5484.

Followed steps to reproduce from https://www.illumos.org/issues/6358
With this patch:
1. 'zpool get all' no longer crashes and all features supported by the running system as "disabled".
2. 'zpool upgrade' will show all features supported as beeing available to upgrade (as it now thinks that the faulted pool has no features).
3. 'zpool upgrade broken_pool' no longer crashes.

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Dan Vatca
Matthew Ahrens
Dan Vatca
Review request changed

Change Summary:

Fixed cstyle issues.

Diff:

Revision 2 (+3 -2)

Show changes

Andrew Stormont
Ship It!
Serban Maduta

LGTM

Ken Mays
Ship It!
Loading...