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 over 8 years ago
- Status changed from New to Closed
commit 973c78e94bf9634782164382c9e291bf81161fa5 Author: George Wilson <email@example.com> 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 <firstname.lastname@example.org> Reviewed by: Matthew Ahrens <email@example.com> Reviewed by: Saso Kiselkov <firstname.lastname@example.org> Approved by: Richard Lowe <email@example.com>