bugGNU GRUB - Bugs: bug #46755, grub-probe for zfs assumes all...

 
 

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

bug #46755: grub-probe for zfs assumes all devices prefix with /dev, ignoring /dev/disk/...

Submitted by:  Chad Miller <chadmiller>
Submitted on:  Fri 25 Dec 2015 03:05:02 PM UTC  
 
Category: NoneSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: DuplicatePrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 
Release: 2.02~beta1Reproducibility: Every Time
Planned Release: None

Fri 12 Feb 2016 07:34:36 AM UTC, comment #2:

Instead of 'zpool status POOL', more useful information could be gleaned from 'zdb -C POOL'. Among other things, zdb provides the full device path for each member of the pool.

For comparison, using zpool:

And using zdb:

Jonathan Vaughn <biosehnsucht>
Fri 25 Dec 2015 03:43:16 PM UTC, comment #1:

Duplicate of 43653.

It should not happen if grub-probe is compiled with libzfs which returns full device name. If grub-probe has to failback to zpool, this is zpool limitation. If you know any zfs command that can return full name, please let us know.

Andrei Borzenkov <arvidjaar>
Project Member
Fri 25 Dec 2015 03:05:02 PM UTC, original submission:

update-grub runs /usr/sbin/grub-probe

/usr/sbin/grub-probe runs ["zpool", "status", poolname]

zpool responds with device names as used at (I think!) pool creation time. Often, this is /dev/disk/by-id/... names, without the path.

grub-probe then parses the output, and takes the names of devices, and if they do not start with a "/", it prepends "/dev/".

It then tests the existence of the path name of the device. it fails.

grub-probe then returns something like

/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/ata-ST31000333AS_99999999-part1'.

The actual path is of course /dev/disk/by-id/ST31000333AS_99999999-part1

Chad Miller <chadmiller>

 

Attached Files
file #35855:  grubprobe-zfspool-device-name-prepend added by chadmiller (1KiB - application/octet-stream - patch to fix. Instead of blindly prepending /dev/, test for existence in /dev/disk/by/ too)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by seschwar
  • -unavailable- added by biosehnsucht (Posted a comment)
  • -unavailable- added by arvidjaar (Posted a comment)
  • -unavailable- added by chadmiller (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 18 Sep 2016 10:44:55 PM UTCseschwarCarbon-Copy-=>Added seschwar
    Fri 25 Dec 2015 03:43:16 PM UTCarvidjaarStatusNone=>Duplicate
      Open/ClosedOpen=>Closed
    Fri 25 Dec 2015 03:08:56 PM UTCchadmillerAttached File-=>Added grubprobe-zfspool-device-name-prepend, #35855

    Back to the top


    Powered by Savane 3.1-cleanup1