-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zpool import read-only #1863
Comments
This is reproducible in 0.6.2 so it's not a regression. It appears to occur because it's attempting to initialize a cache device and obviously that's not possible when the pool is readonly. I'm surprised this wasn't noticed before. |
When a pool is imported read-only avoid validating any hot spare and l2arc vdevs. The validation process can result in the vdev being reinitialized and a new label being written. Since the pool must never be written to the unexpected write IO correctly triggers a VERIFY in the IO pipeline. zpool import -o readonly <pool> ... VERIFY(zio->io_type != ZIO_TYPE_WRITE || spa_writeable(spa)) failed SPLError: 9415:0:(zio.c:2613:zio_vdev_io_start()) SPL PANIC Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#1863
0904c2b appears to work correctly although I'm not 100% sure we can skip all of this validation. This should be perhaps be more targeted. I also don't see why this issue wouldn't impact Illumos/FreeBSD so we should attempt to reproduce it there. @csiden I've checked the Illumos tracker and I don't see anything like this, have you heard of any similar reports? |
When a pool is imported read-only avoid validating any hot spare and l2arc vdevs. The validation process can result in the vdev being reinitialized and a new label being written. Since the pool must never be written to the unexpected write IO correctly triggers a VERIFY in the IO pipeline. zpool import -o readonly <pool> ... VERIFY(zio->io_type != ZIO_TYPE_WRITE || spa_writeable(spa)) failed SPLError: 9415:0:(zio.c:2613:zio_vdev_io_start()) SPL PANIC Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#1863
I was able to replicate that import panic when readonly with cache vdev on FreeBSD 9.2 RELEASE amd64:
Have my first nightly running on an OpenIndiana that I setup a while back, so if that works I'll try the same there. |
@behlendorf I tried out the steps @b333z mentioned and was able to reproduce the issue on illumos, so it looks like it's a problem for everyone. |
@behlendorf I asked George to take a look at it and he said he's almost ready with a better fix (he's running regression tests now). I'll post an update when his fix is ready (he says it should be small and simple). |
George's fix for this is in illumos now: illumos/illumos-gate@973c78e I tested out @b333z's steps with this fix and was no longer able to reproduce the bug. |
@csiden Thanks for the link, I like George's fix much better we'll merge it shortly too. |
4121 vdev_label_init should treat request as succeeded when pool is read only Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net> References: https://www.illumos.org/issues/4121 illumos/illumos-gate@973c78e Ported-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#1863
4121 vdev_label_init should treat request as succeeded when pool is read only Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net> References: https://www.illumos.org/issues/4121 illumos/illumos-gate@973c78e Ported-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#1863
When a pool is imported read-only avoid validating any hot spare and l2arc vdevs. The validation process can result in the vdev being reinitialized and a new label being written. Since the pool must never be written to the unexpected write IO correctly triggers a VERIFY in the IO pipeline. zpool import -o readonly <pool> ... VERIFY(zio->io_type != ZIO_TYPE_WRITE || spa_writeable(spa)) failed SPLError: 9415:0:(zio.c:2613:zio_vdev_io_start()) SPL PANIC Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#1863
Observed when importing a pool read-only, v0.6.2-97_g09d672d.
The text was updated successfully, but these errors were encountered: