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/...

Submitter:  Chad Miller <chadmiller>
Submitted:  Fri 25 Dec 2015 03:05:02 PM UTC
   
 
Category:  None Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Duplicate Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  2.02~beta1
Release:  Reproducibility:  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:


[root@localhost /]# zpool status rpool
  pool: rpool
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(5) for details.
  scan: none requested
config:

        NAME                                      STATE     READ WRITE CKSUM
        rpool                              ONLINE       0     0     0
          ata-TOSHIBA_DT01ACA050_999999999-part1  ONLINE       0     0     0

errors: No known data errors


And using zdb:


[root@localhost /]# zdb -C rpool

MOS Configuration:
        version: 5000
        name: 'rpool'
        state: 0
        txg: 4
        pool_guid: 11603639135903192856
        errata: 0
        hostname: 'localhost'
        vdev_children: 1
        vdev_tree:
            type: 'root'
            id: 0
            guid: 11603639135903192856
            create_txg: 4
            children[0]:
                type: 'disk'
                id: 0
                guid: 13527569036254253061
                path: '/dev/disk/by-id/ata-TOSHIBA_DT01ACA050_999999999-part1'
                whole_disk: 0
                metaslab_array: 34
                metaslab_shift: 32
                ashift: 12
                asize: 499565199360
                is_log: 0
                create_txg: 4
        features_for_read:


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>
Group 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>

 

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

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
  • -email is unavailable- added by seschwar
  • -email is unavailable- added by biosehnsucht (Posted a comment)
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by chadmiller (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-18 seschwar Carbon-Copy- Added seschwar
    2015-12-25 arvidjaar StatusNone Duplicate
        Open/ClosedOpen Closed
    2015-12-25 chadmiller Attached File- Added grubprobe-zfspool-device-name-prepend, #35855

    Back to the top

    Powered by Savane 3.15-ef91.
    Corresponding source code