bugGNU GRUB - Bugs: bug #42632, ZFS pool not detected when...

 
 

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

bug #42632: ZFS pool not detected when multiple pools exist

Submitter:  Tim Chase <dweeezil>
Submitted:  Fri 27 Jun 2014 04:13:32 AM UTC
   
 
Category:  Filesystem Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  Git master
Release:  Reproducibility:  Every Time
Planned Release:  None

Sat 24 Jan 2015 07:58:57 PM UTC, comment #5: 

Fixed by changing underlying logic to easier variant using "original" parameter.

Vladimir Serbinenko <phcoder>
Group administrator
Tue 09 Dec 2014 07:41:35 PM UTC, comment #4: 

Patch looks sensible but does not it make data->mounted completely redundant? Could you review if it can be removed and send patch against master to grub-devel?

Andrei Borzenkov <arvidjaar>
Group Member
Sat 28 Jun 2014 12:48:06 PM UTC, comment #3: 

For some reason, the output from the fixed version was dropped in the last comment.  Here it is:


grub rescue> search.fs_uuid 309552130814F499
 hd2,gpt2 hd3,gpt2 hd4,gpt2
grub rescue>
grub rescue> search.fs_uuid 9CF96F0E0B19F229
 hd5,gpt2


Tim Chase <dweeezil>
Sat 28 Jun 2014 12:45:58 PM UTC, comment #2: 

I've done some more experimentation and believe my fix is correct.  Some pool combinations will "work" because the extra vdevs being included in the pool don't harm anything so long as the correct vdev is referenced when a file is accessed.  Here's an example of the bug from current master code:

Test 1: A 3-vdev striped pool consisting of (hd2,gpt2), (hd3,gpt2) and (hd4,gpt2) is followed by a single-vdev pool in (hd5,gpt2).  The guid of the first pool is 309552130814F499 and the guid of the second pool is 9CF96F0E0B19F229:


grub rescue> search.fs_uuid 309552130814F499
 hd4,gpt2
grub rescue> search.fs_uuid 9CF96F0E0B19F229
 hd2,gpt2 hd3,gpt2 hd5,gpt2


and this is with the fix:


grub rescue> search.fs_uuid 309552130814F499
 hd2,gpt2 hd3,gpt2 hd4,gpt2

grub rescue> search.fs_uuid 9CF96F0E0B19F229
 hd5,gpt2grub rescue>
grub rescue>
-verbatim+

Without the fix, the pool assembly code becomes confused because it's adding unrelated vdevs to the pool.  As mentioned above, however, this can be benign in some cases depending on the exact configuration of the pool.

Tim Chase <dweeezil>
Fri 27 Jun 2014 01:16:06 PM UTC, comment #1: 

I should add that for some reason, this problem doesn't seem to occur for all types of pools.  For example, a 3-disk striped pool followed by a single-disk pool seems to work.  I need to investigate this further since it might indicate a different solution is in order.

Tim Chase <dweeezil>
Fri 27 Jun 2014 04:13:32 AM UTC, original submission:  

The vdev-skipping logic causes pools to be missed in some cases when multiple pools exist on a system.  For example, if a system has a 3-disk raidz in one pool followed by a single-disk pool, the scanning of the 4th disk will cause the first pool to not be seen.

The most typical failure scenario is a failure of the "search.fs_uuid" command when a root pool is "followed" by a data pool.

I've worked up a fix in https://github.com/dweeezil/grub/commit/e5d99839343a41dc1826ec6875230c557694497b.  This is my first look at the grub code so I'm not sure if it's correct, but it does seem to fix the problem.

Tim Chase <dweeezil>

 

(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 phcoder (Posted a comment)
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by dweeezil (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.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-01-24 phcoder StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code