[Bug 1527727] Re: grub-probe for zfs assumes all devices prefix with /dev, ignoring /dev/disk/...

Martin Pitt martin.pitt at ubuntu.com
Tue Feb 16 08:03:19 UTC 2016


Just prepending /dev to the device name is obviously wrong indeed, but
slapping random other prefixes onto it does not make it better really.
This hardcodes udev rules and kernel/driver behaviour, which is always
going to be brittle or incomplete -- people might set up their own
device namings, or use a funny device driver. For example, in this patch
/dev/mapper/ is missing.

So this is a hack which I wouldn't like to see in an LTS release --
let's please fix the ZFS CLI tools by either

  - show the full path by default. It's more useful for human users, and
the current behaviour of showing only the basename of a device node is
completely useless for tools that parse the output

 - add a new option --machine-readable or similar which shows full
paths, if not changing the default output format is important

Alternatively it might be possible to pry this information out of /sys
somewhere?

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1527727

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

Status in grub:
  Unknown
Status in grub2 package in Ubuntu:
  Confirmed

Bug description:
  update-grub runs /usr/sbin/grub-probe

  Without libzfslinux support compiled in, /usr/sbin/grub-probe runs
  ["zpool", "status", poolname] to find out ZFS info.

  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

  It can prepend smarter than "/dev" or it can understand ZFS natively,
  to fix the problem.

To manage notifications about this bug go to:
https://bugs.launchpad.net/grub/+bug/1527727/+subscriptions



More information about the Ubuntu-sponsors mailing list