How can I undo zpool offline -f
?
#11665
Unanswered
techhazard
asked this question in
Q&A
Replies: 2 comments 4 replies
-
May be help: #10254 (comment) |
Beta Was this translation helpful? Give feedback.
3 replies
-
This seems relevant: Line 797 in 9305ff2 I wonder if you can simply comment out this if-statement and re-compile the module. /*
* ZPOOL_CONFIG_AUX_STATE = "external" means we previously forced a
* fault on a vdev and want it to persist across imports (like with
* zpool offline -f).
*/
rc = nvlist_lookup_string(nv, ZPOOL_CONFIG_AUX_STATE, &tmp);
if (rc == 0 && tmp != NULL && strcmp(tmp, "external") == 0) {
vd->vdev_stat.vs_aux = VDEV_AUX_EXTERNAL;
vd->vdev_faulted = 1;
vd->vdev_label_aux = VDEV_AUX_EXTERNAL;
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have made a terrible mistake, but I think it might still be possible to recover from it.
In short:
zpool offline -f
VDEV_AUX_EXTERNAL_PERSIST
that has been set byzpool offline -f
)zpool online
the device, because that only works on imported pools.How can I ignore the offline flag of the device so that I can import the pool and move the data to a new pool?
For this to work I think I need either:
VDEV_AUX_EXTERNAL_PERSIST
while the pool is exported.VDEV_AUX_EXTERNAL_PERSIST
so that I can runzpool online
on the device (assuming that will work)But there may be another solution I'm not seeing.
I already looked a bit through the codebase, but I'm no real C dev, and I'd rather not do something that will corrupt the pool any further...
These parts seem related:
If I should provide more information, please let me know
Beta Was this translation helpful? Give feedback.
All reactions