root on raid device doesn't get /dev/disk/by-id/md-{name,uuid} symlinks after boot

Bug #1663725 reported by Ryan Harper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
New
Undecided
Unassigned

Bug Description

ubuntu@ubuntu:~$ lsb_release -rd
Description: Ubuntu Zesty Zapus (development branch)
Release: 17.04
ubuntu@ubuntu:~$ uname -a
Linux ubuntu 4.9.0-15-generic #16-Ubuntu SMP Fri Jan 20 15:28:49 UTC 2017 ppc64le ppc64le ppc64le GNU/Linux

ubuntu@ubuntu:~$ apt-cache policy systemd
systemd:
  Installed: 232-8
  Candidate: 232-8
  Version table:
 *** 232-8 500
        500 http://ports.ubuntu.com/ubuntu-ports zesty/main ppc64el Packages
        100 /var/lib/dpkg/status

3) root@ubuntu:~# ls -al /dev/disk/by-id/md-*
lrwxrwxrwx 1 root root 9 Feb 10 19:42 /dev/disk/by-id/md-name-ubuntu:foobar -> ../../md0
lrwxrwxrwx 1 root root 9 Feb 10 19:42 /dev/disk/by-id/md-uuid-bd97a135:166d5e7e:29e6b0eb:a3cad7c3 -> ../../md0

4)root@ubuntu:~# ls -al /dev/disk/by-id/md-* returns nothing

Note, I can re-trigger events on md0 and the links will appear.

udevadm test $(udevadm info -q path -n /dev/md0)

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: udev 232-8
ProcVersionSignature: User Name 4.9.0-15.16-generic 4.9.5
Uname: Linux 4.9.0-15-generic ppc64le
.var.log.platform: Error: [Errno 13] Permission denied: '/var/log/platform'
ApportVersion: 2.20.4-0ubuntu1
Architecture: ppc64el
CustomUdevRuleFiles: main_disk-part1.rules.rules third_disk.rules.rules md0.rules.rules second_disk-part1.rules.rules second_disk.rules.rules third_disk-part1.rules.rules main_disk-part2.rules.rules fourth_disk.rules.rules fourth_disk-part1.rules.rules main_disk.rules.rules
Date: Fri Feb 10 19:38:42 2017
Lsusb: Error: command ['lsusb'] failed with exit code 1:
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinux-4.9.0-15-generic root=UUID=a8f0a084-efb9-11e6-9e80-525400123456 ro console=hvc0
ProcLoadAvg: 0.32 0.17 0.06 1/146 6210
ProcLocks:
 1: POSIX ADVISORY WRITE 5006 00:12:22238 0 EOF
 2: POSIX ADVISORY WRITE 5015 00:12:22033 0 EOF
 3: FLOCK ADVISORY WRITE 5007 00:12:22011 0 EOF
 4: POSIX ADVISORY WRITE 4979 00:12:21491 0 EOF
 5: POSIX ADVISORY WRITE 2643 00:12:13926 0 EOF
ProcSwaps:
 Filename Type Size Used Priority
 /swap.img file 1157056 0 -1
ProcVersion: Linux version 4.9.0-15-generic (buildd@bos01-ppc64el-020) (gcc version 6.3.0 20161229 (User Name 6.3.0-2ubuntu1) ) #16-User Name SMP Fri Jan 20 15:28:49 UTC 2017
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)
cpu_cores: Number of cores present = 1
cpu_coreson: Number of cores online = 1
cpu_smt: Error: command ['ppc64_cpu', '--smt'] failed with exit code 255: Machine is not SMT capable

Revision history for this message
Ryan Harper (raharper) wrote :
tags: added: curtin
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

There are a lot of custom udev rules

CustomUdevRuleFiles: main_disk-part1.rules.rules third_disk.rules.rules md0.rules.rules second_disk-part1.rules.rules second_disk.rules.rules third_disk-part1.rules.rules main_disk-part2.rules.rules fourth_disk.rules.rules fourth_disk-part1.rules.rules main_disk.rules.rules

Can you attach them?

Are all of those included in the initramfs as well? (check with e.g. lsinitramfs)

The md-name and md-uuid symlinks are generated by the udev rules shipped by the mdadm package.

affects: systemd (Ubuntu) → mdadm (Ubuntu)
Revision history for this message
Ryan Harper (raharper) wrote :
Revision history for this message
Ryan Harper (raharper) wrote :

> Are all of those included in the initramfs as well? (check with e.g. lsinitramfs)

No; but they don't need to be; it's purely helpful symlinks to provide a "name" for a device that's independent of the disk (/dev/disk/by-dname/database -> /dev/vdc).

drwxr-xr-x 2 root root 0 Mar 28 14:24 lib/udev/rules.d
-rw-r--r-- 1 root root 4250 Nov 14 01:05 lib/udev/rules.d/69-lvm-metad.rules
-rw-r--r-- 1 root root 2710 Dec 17 00:54 lib/udev/rules.d/71-seat.rules
-rw-r--r-- 1 root root 5832 Dec 17 00:54 lib/udev/rules.d/60-persistent-storage.rules
-rw-r--r-- 1 root root 961 Dec 17 00:54 lib/udev/rules.d/73-special-net-names.rules
-rw-r--r-- 1 root root 3310 Dec 17 00:54 lib/udev/rules.d/50-udev-default.rules
-rw-r--r-- 1 root root 1051 Jun 26 2015 lib/udev/rules.d/69-bcache.rules
-rw-r--r-- 1 root root 452 Dec 17 00:54 lib/udev/rules.d/75-net-description.rules
-rw-r--r-- 1 root root 2130 Mar 28 14:24 lib/udev/rules.d/63-md-raid-arrays.rules
-rw-r--r-- 1 root root 618 Dec 17 00:54 lib/udev/rules.d/80-drivers.rules
-rw-r--r-- 1 root root 210 Dec 17 00:54 lib/udev/rules.d/50-firmware.rules
-rw-r--r-- 1 root root 456 Dec 17 00:54 lib/udev/rules.d/61-persistent-storage-android.rules
-rw-r--r-- 1 root root 2446 Nov 14 01:05 lib/udev/rules.d/56-lvm.rules
-rw-r--r-- 1 root root 6919 Nov 14 01:05 lib/udev/rules.d/55-dm.rules
-rw-r--r-- 1 root root 1495 Nov 14 01:05 lib/udev/rules.d/60-persistent-storage-dm.rules
-rw-r--r-- 1 root root 692 Dec 17 00:54 lib/udev/rules.d/73-usb-net-by-mac.rules
-rw-r--r-- 1 root root 292 Dec 17 00:54 lib/udev/rules.d/80-net-setup-link.rules
-rw-r--r-- 1 root root 1366 Mar 28 14:24 lib/udev/rules.d/64-md-raid-assembly.rules

> The md-name and md-uuid symlinks are generated by the udev rules shipped by the mdadm package.

Correct; which is why it appears to be a bug in mdadm; that package provides the rules file.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.