/dev/bcache/by-uuid links not created after reboot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Medium
|
Joseph Salisbury | ||
Xenial |
Fix Released
|
Medium
|
Joseph Salisbury | ||
Zesty |
Won't Fix
|
Medium
|
Joseph Salisbury | ||
Artful |
Fix Released
|
Medium
|
Joseph Salisbury | ||
Bionic |
Fix Released
|
Medium
|
Joseph Salisbury |
Bug Description
1. $ lsb_release -rd
Description: Ubuntu 17.10
Release: 17.10
2. $ apt-cache policy linux-image-`uname -r`
linux-image-
Installed: 4.13.0-16.19
Candidate: 4.13.0-16.19
Version table:
*** 4.13.0-16.19 500
500 http://
100 /var/lib/
3. After creating some bcache devices and rebooting /dev/bcache/
symlinks point to the current bcache device which is caching the dev.uuid found after creating a backing device.
4. /dev/bcache/by-uuid does not exist and there are not symlinks underneath
It appears that since the initramfs loads the bcache module which probes and finds all of the cache devices and backing devices then once the rootfs is mounted and udev gets to run, the bcache kernel module does not emit the CACHED_UUID value into the environment if the underlying devices are already registered.
In dmesg, one can see that prior to mounting the rootfs, we see bcache register events:
[ 5.333973] bcache: register_bdev() registered backing device vdb2
[ 5.354138] bcache: register_bdev() registered backing device vdb4
[ 5.365665] bcache: register_bdev() registered backing device vdb3
[ 5.397720] bcache: bch_journal_
[ 5.428683] bcache: register_cache() registered cache device vdb1
then rootfs ismounted and systemd starts systemd-udev
[ 9.350889] systemd[1]: Listening on udev Kernel Socket.
And then the coldplug replay of kernel events triggers /lib/udev/
which invokes /lib/udev/
[ 11.173141] bcache: register_bcache() error opening /dev/vdb2: device already registered
[ 11.184617] bcache: register_bcache() error opening /dev/vdb3: device already registered
[ 11.199130] bcache: register_bcache() error opening /dev/vdb1: device already registered
[ 11.271694] bcache: register_bcache() error opening /dev/vdb4: device already registered
The problem then is that only a kernel call to bch_cached_
bcache_register()
register_bdev()
bch_
kobject_
where env includes:
"DRIVER=
NULL,
NULL,
};
Since that event is not emitted for any previously registered device, then the symlink will not be created.
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: linux-image-
ProcVersionSign
Uname: Linux 4.13.0-16-generic x86_64
AlsaDevices:
total 0
crw-rw---- 1 root audio 116, 1 Oct 31 22:09 seq
crw-rw---- 1 root audio 116, 33 Oct 31 22:09 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.7-0ubuntu3.1
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
Date: Wed Nov 1 01:39:01 2017
Ec2AMI: ami-0000030b
Ec2AMIManifest: FIXME
Ec2Availability
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
Lsusb:
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: OpenStack Foundation OpenStack Nova
PciMultimedia:
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=C.UTF-8
SHELL=/bin/bash
ProcFB:
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware N/A
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: 1.10.1-
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.
dmi.modalias: dmi:bvnSeaBIOS:
dmi.product.family: Virtual Machine
dmi.product.name: OpenStack Nova
dmi.product.
dmi.sys.vendor: OpenStack Foundation
Related bugs:
* bug 1728742: [userspace] curtin dname for bcache uses unstable devname instead of UUID Edit
Related branches
- Christian Ehrhardt (community): Approve
- Canonical Server Core Reviewers: Pending requested
- Canonical Server: Pending requested
-
Diff: 154 lines (+115/-2)4 files modifieddebian/changelog (+7/-0)
debian/control (+3/-2)
debian/patches/0003-Add-bcache-export-cached-helper.patch (+104/-0)
debian/patches/series (+1/-0)
- Rafael David Tinoco (community): Approve
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
-
Diff: 154 lines (+115/-2)4 files modifieddebian/changelog (+7/-0)
debian/control (+3/-2)
debian/patches/0003-Add-bcache-export-cached-helper.patch (+104/-0)
debian/patches/series (+1/-0)
- Rafael David Tinoco (community): Approve
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
-
Diff: 212 lines (+116/-53)5 files modifieddebian/changelog (+8/-0)
debian/control (+3/-2)
debian/patches/0003-Add-bcache-export-cached-helper.patch (+104/-0)
debian/patches/series (+1/-1)
dev/null (+0/-50)
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser (community): Approve
- Dmitrii Shcherbakov (community): Approve
-
Diff: 676 lines (+148/-259)12 files modifiedcurtin/block/bcache.py (+87/-0)
curtin/commands/block_meta.py (+11/-4)
curtin/commands/curthooks.py (+2/-2)
dev/null (+0/-128)
tests/unittests/test_make_dname.py (+28/-1)
tests/vmtests/__init__.py (+5/-1)
tests/vmtests/test_basic.py (+8/-10)
tests/vmtests/test_lvm.py (+0/-9)
tests/vmtests/test_mdadm_bcache.py (+7/-73)
tests/vmtests/test_nvme.py (+0/-18)
tests/vmtests/test_raid5_bcache.py (+0/-4)
tests/vmtests/test_uefi_basic.py (+0/-9)
Changed in linux (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in linux (Ubuntu Artful): | |
status: | Confirmed → Triaged |
Changed in linux (Ubuntu Zesty): | |
status: | New → Triaged |
Changed in linux (Ubuntu Xenial): | |
status: | New → Triaged |
Changed in linux (Ubuntu Zesty): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Xenial): | |
importance: | Undecided → Medium |
tags: | added: cpe-onsite |
tags: |
added: kernel-key removed: kernel-da-key |
Changed in linux (Ubuntu Xenial): | |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
status: | Triaged → In Progress |
Changed in linux (Ubuntu Zesty): | |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
status: | Triaged → In Progress |
Changed in linux (Ubuntu Artful): | |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
status: | Triaged → In Progress |
Changed in linux (Ubuntu Bionic): | |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
status: | Triaged → In Progress |
tags: | removed: kernel-key |
Changed in systemd (Ubuntu Xenial): | |
status: | New → Won't Fix |
Changed in systemd (Ubuntu Zesty): | |
status: | New → Won't Fix |
Changed in systemd (Ubuntu Artful): | |
status: | New → Won't Fix |
Changed in systemd (Ubuntu Bionic): | |
status: | Incomplete → Won't Fix |
Changed in linux (Ubuntu Zesty): | |
status: | In Progress → Won't Fix |
Changed in linux (Ubuntu Xenial): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Artful): | |
status: | In Progress → Fix Committed |
description: | updated |
no longer affects: | systemd (Ubuntu) |
no longer affects: | systemd (Ubuntu Xenial) |
no longer affects: | systemd (Ubuntu Zesty) |
no longer affects: | systemd (Ubuntu Artful) |
no longer affects: | systemd (Ubuntu Bionic) |
Changed in linux (Ubuntu Bionic): | |
status: | In Progress → Fix Committed |
tags: |
added: kernel-fixup-verification-needed-bionic removed: verification-needed-bionic |
tags: | added: verification-needed-bionic |
tags: | added: cscc |
This change was made by a bot.