GRUB fails to install during ZFS replace resilvers

Bug #1639209 reported by Richard Laager
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Replace a drive in a pool.
zpool replace grape1 sdg1 sdf1

Note that this creates a replacing-0 line in the zpool status output:

root@grape:~# zpool status
  pool: grape1
 state: ONLINE
status: One or more devices is currently being resilvered. The pool will
 continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
  scan: resilver in progress since Fri Nov 4 04:58:55 2016
    37.4G scanned out of 4.06T at 17.6M/s, 66h42m to go
    5.26G resilvered, 0.90% done
config:

 NAME STATE READ WRITE CKSUM
 grape1 ONLINE 0 0 0
   raidz3-0 ONLINE 0 0 0
     replacing-0 ONLINE 0 0 0
       sdg1 ONLINE 0 0 0
       sdf1 ONLINE 0 0 0 (resilvering)
     sdd1 ONLINE 0 0 0
     sdc1 ONLINE 0 0 0
     sdb1 ONLINE 0 0 0
     sdh1 ONLINE 0 0 0
     sde1 ONLINE 0 0 0
     sda1 ONLINE 0 0 0

errors: No known data errors

Then try to install GRUB to that drive:

root@grape:~# grub-install /dev/sdf
Installing for i386-pc platform.
grub-install: error: failed to get canonical path of `/dev/replacing-0'.

The attached patch fixes this.

Unfortunately, then I get this:

root@grape:~# grub-install /dev/sdf
Installing for i386-pc platform.
grub-install: error: unknown filesystem.

Tags: patch
Revision history for this message
Richard Laager (rlaager) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "zfs-ignore-replacing.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

Revision history for this message
Richard Laager (rlaager) wrote :

Once the resilver completed, I was able to grub-install successfully. Looking at the grub-install debug output, it seems that GRUB looks primarily at the first device. I have a hunch that my patch would fix the case where the first device is not the one being resilvered. But we still need to fix the case where the first device is being resilvered.

Revision history for this message
Richard Laager (rlaager) wrote :
Revision history for this message
Richard Laager (rlaager) wrote :
Revision history for this message
Richard Laager (rlaager) wrote :

Any chance of seeing this merged for Bionic?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.