bugGNU GRUB - Bugs: bug #62197, grub-install fails if ZFS root...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #62197: grub-install fails if ZFS root pool is in degraded state

Submitter:  Prakash Surya <prakashsurya>
Submitted:  Fri 18 Mar 2022 05:37:32 PM UTC
   
 
Category:  None Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release:  other
Release:  Reproducibility:  None
Planned Release:  None

Fri 18 Mar 2022 05:37:32 PM UTC, original submission:  

I have a system with a root ZFS pool that's DEGRADED:

    $ zpool status -v
      pool: rpool
     state: DEGRADED
    status: One or more devices has experienced an unrecoverable error. An
            attempt was made to correct the error. Applications are unaffected.
    action: Determine if the device needs to be replaced, and clear the errors
            using 'zpool clear' or replace the device with 'zpool replace'.
       see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-9P
    config:

            NAME STATE READ WRITE CKSUM
            rpool DEGRADED 0 0 0
              sda1 DEGRADED 0 0 0 too many errors

    errors: No known data errors

In this state, "grub-install" will fail:

    grub-install: error: failed to get canonical path of `rpool/grub'.

If I apply the following patch, "grub-install" works properly:

    --- a/grub-core/osdep/unix/getroot.c
    +++ b/grub-core/osdep/unix/getroot.c
    @@ -296,7 +296,7 @@ grub_util_find_root_devices_from_poolname (char *poolname)
            && !sscanf (name, "raidz1%u", &dummy)
            && !sscanf (name, "raidz2%u", &dummy)
            && !sscanf (name, "raidz3%u", &dummy)
    - && !strcmp (state, "ONLINE"))
    + && (!strcmp (state, "ONLINE") || !strcmp (state, "DEGRADED")))
              {
            if (ndevices >= devices_allocated)
              {

Prakash Surya <prakashsurya>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by prakashsurya (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code