+++ This bug was initially created as a clone of Bug #232671 +++ I'd like the gmirror softc and individual gmirror disk elements to record two formatted messages: 1. Why did we switch to the current state from the previous one? 2. Why *haven't* we switched to some next state, where there is an obvious linear sequence of transitions. Additionally, I'd like that information available in DDB and perhaps the runtime geom commands. It may also be useful for printing at mountroot panics. For the scenario described in the bug this was cloned from, that might be: root0.why_status = "Found enough (2/2) disks in ANY state and found 0 dirty disks (unforced)" root0.why_not_next = "n/a" root0.why_destroy = "0/2 mirror disks in ACTIVE or NEW state (need at least 1)" da2p5.why_status = "broken (stale): old generation id N; current mirrorset generation is M" da2p5.why_not_next = "n/a" da16p3.why_status = "Synchronizing: Part of active mirrorset generation (NN), but initiated synchronization operation has not completed" da16p3.why_not_next = "Synchronizing: progress: N/M bytes; last forward progress at time TTTT" In that scenario, da15p3 never made it in time for the mirror to still exist, but if it had: da15p3.why_status = "Clean mirror with active mirrorset generation (NN)" da15p3.why_not_next = "n/a"
Some work in progress.
I'm less sure we need this particular proposal. The current messages are sort of good enough, just not particularly clear if you're not familiar with gmirror already. I think we could do some minor tweaking of the existing text to improve that.
WONTFIX