Public bug reported:

grub-probe /

fails with grub-probe: error: failed to get canonical path of
`/dev/HDD0p2'. This is simply because grub makes the wrong assumption,
that "zpool status $pool" lists the vdevs in use only with the '/dev/'
prefix stripped off. It probably assumes something like /dev/sda etc.,
which is discouraged to use.

Instead, grub should use "zpool status -P $pool" to get the full device
path. This would probably result into a symlink, e.g. /dev/disk-by-
id/$bla . If this is not sufficient, grub should use realpath() to get
the final blockdev entry like /dev/sda1 .

The current setup I use is:

433 0 drwxr-xr-x 4 root root 80 Apr 28 20:22 /dev/chassis/SYS
434 0 drwxr-xr-x 2 root root 200 Apr 28 23:06 /dev/chassis/SYS/HDD0
435 0 lrwxrwxrwx 1 root root 12 Apr 28 23:16 /dev/chassis/SYS/HDD0/HDD0 -> 
../../../sda
417 0 lrwxrwxrwx 1 root root 13 Apr 28 23:16 /dev/chassis/SYS/HDD0/HDD0p1 -> 
../../../sda1
442 0 lrwxrwxrwx 1 root root 13 Apr 28 23:16 /dev/chassis/SYS/HDD0/HDD0p2 -> 
../../../sda2
423 0 lrwxrwxrwx 1 root root 13 Apr 28 23:16 /dev/chassis/SYS/HDD0/HDD0p9 -> 
../../../sda9
436 0 lrwxrwxrwx 1 root root 12 Apr 28 23:16 /dev/chassis/SYS/HDD0/disk -> 
../../../sda
418 0 lrwxrwxrwx 1 root root 13 Apr 28 23:16 /dev/chassis/SYS/HDD0/p1 -> 
../../../sda1
443 0 lrwxrwxrwx 1 root root 13 Apr 28 23:16 /dev/chassis/SYS/HDD0/p2 -> 
../../../sda2
424 0 lrwxrwxrwx 1 root root 13 Apr 28 23:16 /dev/chassis/SYS/HDD0/p9 -> 
../../../sda9
437 0 drwxr-xr-x 2 root root 80 Apr 28 20:22 /dev/chassis/SYS/HDD1
438 0 lrwxrwxrwx 1 root root 12 Apr 28 23:16 /dev/chassis/SYS/HDD1/HDD1 -> 
../../../sdb
439 0 lrwxrwxrwx 1 root root 12 Apr 28 23:16 /dev/chassis/SYS/HDD1/disk -> 
../../../sdb

with 'zpool create ... rpool /dev/chassis/SYS/HDD0/HDD0p2'

PS: The full version is 2.02~beta2-36ubuntu3.9 and ZoL 0.6.5.6-0ubuntu15
(Ubuntu xenial 16.04).

For simulation one may setup a VirtualBox VM, with Storage == Controller SAS 
(Type: LsiLogic SAS, Port Count: 8), and e.g. one VDI attached to it (/dev/sda) 
and e.g. netboot an install image. When it comes to the 'partitioning disks' 
dialog, start a shell and fetch/install ksh93 (i.e. ksh-udeb).
Than the script http://iks.cs.ovgu.de/~elkner/tmp/ubuntu/bayLinks.sh can be 
used, to create the required dev symlinks (e.g. bayLinks.sh -mru). For 
convenience http://iks.cs.ovgu.de/~elkner/tmp/ubuntu/ubuntu-part.sh can be used 
to create the script for [re-]partitioning the drive[s] and setup zfs related 
stuff (whereby the 'zpool create' and consecutive stuff will fail because of 
the bug). E.g. /tmp/ubuntu-part.sh /dev/chassis/SYS/HDD0/HDD0 .

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1687664

Title:
  grub-probe zfs bug: failed to get canonical path

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1687664/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to