← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1728742] Re: curtin dname for bcache uses unstable devname instead of UUID

 

Ubuntu 17.10 (Artful Aardvark) has reached end of life, so this bug will
not be fixed for that specific release.

** Changed in: curtin (Ubuntu Artful)
       Status: New => Won't Fix

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1728742

Title:
  curtin dname for bcache uses unstable devname instead of UUID

Status in bcache-tools:
  New
Status in curtin:
  Fix Released
Status in curtin package in Ubuntu:
  Fix Released
Status in bcache-tools source package in Trusty:
  Invalid
Status in curtin source package in Trusty:
  Won't Fix
Status in bcache-tools source package in Xenial:
  Invalid
Status in curtin source package in Xenial:
  New
Status in bcache-tools source package in Artful:
  Invalid
Status in curtin source package in Artful:
  Won't Fix
Status in bcache-tools source package in Bionic:
  Invalid
Status in curtin source package in Bionic:
  Fix Released
Status in bcache-tools package in Debian:
  Confirmed

Bug description:
  [Impact]

   * Current users of bcache devices may encounter unreliable device
     numbering as the Linux kernel does not guarantee that bcache
     minor numbers are assigned to the same devices at each boot.
     Users who may have used /dev/bcacheN in paths to a specific
     device could possible be pointing to a different dataset
     altogether.  bcache udev rules do provide some mechanism to
     generate persistent symlinks in /dev/bcache/by-uuid or
     /dev/bcache/by-label which is based on superblock data on
     the underlying device.  However, the Linux kernel does not
     always generate an kernel uevent to trigger the udev rules
     to create the symlink.

   * The fix adds a udev program which will read bcache superblock
     of slave devices and extract the UUID and LABEL, exporting them
     to udev for use in the bcache rule files.

   * This is affected in upstream bcache-tools, the owning package
     of the udev rules.  This affects all releases of bcache-tools
     as the rules rely upon the kernel to trigger these events,
     though that is not a requirement to resolve the lack of
     persistent links.

  [Test Case]

   * Launch and Ubuntu Cloud Image with 3 unused disks
     - apt install bcache-tools tree
     - make-bcache -C /dev/vdb
     - make-bcache -B /dev/vdc
     - make-bcache -B /dev/vdd
     - echo "vdc" > /sys/class/block/bcache0/bcache/label
     - echo "vdd" > /sys/class/block/bcache1/bcache/label
     - reboot

     - Run this test:

      #!/bin/bash
      FAIL=0
      [ ! -d /dev/bcache ] && {
          echo "FAIL: /dev/bcache is not a directory";
          exit 1
      }
      for label in /dev/bcache/by-label/*; do
          LABEL_TARGET="$(ls -1 /sys/class/block/`basename $label`/holders/)"
          DEVNAME=`readlink -f $label`;
          KNAME="${DEVNAME#*/dev/}"
          if [ "$LABEL_TARGET" != "$KNAME" ]; then
              echo "FAIL: label points to $LABEL_TARGET but symlink points to $DEVNAME";
              FAIL=1
          fi;
      done
      if [ "$FAIL" == "0" ]; then
          echo "PASS";
          exit 0
      fi
      exit 1

  [Regression Potential]

   * As bcache minor numbers and these symlinks have been unreliable in
     the past there may be code that makes assumptions about
     /dev/bcache* expanded only to the block devices, versus
     /dev/bcache which is a directory.

  [Original Description]

  Bcache device names like /dev/bcache0 are unstable.  Bcache does not
  use any predictable ordering when assembling bcache devices, so on
  systems with multiple bcache devices, a symlink to /dev/bcache0 may
  end up pointing do a different device.

  the bcache dname symlink should point to the /dev/bcache/by-
  uuid/<UUID> which matches the backing device UUID that's set at
  creation time.

  Related bugs:
   * bug 1729145: [kernel] /dev/bcache/by-uuid links not created after reboot

To manage notifications about this bug go to:
https://bugs.launchpad.net/bcache-tools/+bug/1728742/+subscriptions