Skip to content
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

Minor fix to initrd script #3636

Closed
wants to merge 1 commit into from

Conversation

FransUrbo
Copy link
Contributor

Make sure that POOL_IMPORTED is set, unset and checked where appropriate.

  • If it's unset in find_rootfs(), no pool is imported so no point in
    looking for a rootfs.
  • If find_rootfs() couldn't find a rootfs, the pool is exported. Remember
    to unset POOL_IMPORTED after doing so.
  • Set POOL_IMPORTED if/when a pool have been imported in import_pool().

@FransUrbo
Copy link
Contributor Author

@behlendorf This isn't really important, but IF (!! :) you have time on your hands you don't know what to do with, maybe get it into 0.6.5… But only if you have the time. We can do this in "Phase 2" after the tag...

@behlendorf
Copy link
Contributor

Since this only impact the initramfs I'm happy to merge it if your happy with it.

@behlendorf behlendorf added this to the 0.6.5 milestone Jul 27, 2015
@FransUrbo
Copy link
Contributor Author

I haven't run it trough "it's paces" (I'm waiting for my server to crash AGAIN - ZFS unrelated, but still). Once the HW watchdog reboots the machine, one of the disks isn't recognized by it's controller, leading to a failure to import. However, this wasn't caught, instead failing because it couldn't mount the root fs..

I think the disk is on it's final stretch… Strange, considering that NOTHING is indicated about this ANYWHERE (nothing in ZFS - no checksum errors etc, all S.M.A.R.T. tests succeeds etc, etc)!

Since it's a little difficult for me to simulate a import failure in the initrd, I have to wait for it to actually occur "for real" (which is why I haven't noticed this before). The code should work, but give me a day or so to be sure. I'll let you know when it's verified to be ok to merge.

…ate.

* If it's unset in find_rootfs(), no pool is imported so no point in
  looking for a rootfs.
* If find_rootfs() couldn't find a rootfs, the pool is exported. Remember
  to unset POOL_IMPORTED after doing so.
* Set POOL_IMPORTED if/when a pool have been imported in import_pool().
* Improve backup import (the one using cache file).
@FransUrbo
Copy link
Contributor Author

@behlendorf Ok, now I'm happy with it.

I took the liberty to fix some minor issue with the backup import (the one using the cache file) while I was looking at the code. We need to make sure there IS a cache file before we try doing that. But if there isn't, we still need the error message and the rescue shell.

Feel free to merge at your discretion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants