vdev_label_init should treat request as succeeded when pool is read only
We have run into an assertion on FreeBSD while trying to import a pool read-only:
zio->io_type != ZIO_TYPE_WRITE || spa_writeable(spa)
Looking more closely, it seems that the write was initiated by vdev_label_init, which is in turn called from spa_import via spa_validate_aux. When importing a pool read-only, it does not really make sense to actually do full initialization of a label, which would in turn initiate a write that violates the aforementioned assertion.
This version of patch was originally suggested by George Wilson. Our initial version covers only spa_import() and skips calls to spa_validate_aux() if pool is not imported with write enabled.
We would like to have the patch applied against Illumos since the same problem would exist there too.
Updated by Christopher Siden almost 6 years ago
- Status changed from New to Closed
commit 973c78e94bf9634782164382c9e291bf81161fa5 Author: George Wilson <firstname.lastname@example.org> Date: Wed Dec 11 11:45:30 2013 4121 vdev_label_init should treat request as succeeded when pool is read only Reviewed by: Christopher Siden <email@example.com> Reviewed by: Matthew Ahrens <firstname.lastname@example.org> Reviewed by: Saso Kiselkov <email@example.com> Approved by: Richard Lowe <firstname.lastname@example.org>