Investigating why /dev doesn't have the correct links even if they're
present led me to look at
/usr/share/initramfs-tools/scripts/init-bottom/udev (provided via the udev
dpkg from systemd)
In there, the mount -n -o move is used to migrate the /dev from initramfs
to the rootfs/dev
Indicated that the initramfs may have util-linux version of mount which
needs to use
mount --move instead. This is addressed in newer systemd packages (in
bionic for sure)
And the mount line now looks like this:
# move the /dev tmpfs to the rootfs; fall back to util-linux mount that does
# not understand -o move
mount -n -o move /dev ${rootmnt}/dev || mount -n --move /dev ${rootmnt}/dev
Let's see if that helps resolve the "missing" symlinks.
On Thu, Nov 30, 2017 at 10:27 AM, Ryan Harper <email address hidden>
wrote:
> So, /dev/bcache/by-uuid is not getting created.
>
> That's the same kernel bug I filed.
>
> And, if they were, I think they'd get moved properly.
>
> init-bottom/udev script does the following:
>
> # Stop udevd, we'll miss a few events while we run init, but we catch up
> udevadm control --exit
>
> # move the /dev tmpfs to the rootfs
> mount -n -o move /dev ${rootmnt}/dev
>
> That "move" operation migrates the entire mounted directory to a new
> location
> so, if /dev/bcache/by-uuid existed, it would be present when systemd init
> runs.
>
> AFAICT, there's not fix here without the kernel side.
>
> On Thu, Nov 30, 2017 at 10:09 AM, Dmitrii Shcherbakov <
> <email address hidden>> wrote:
>
>> Just in case also checked with this rule that creates links at /dev
>> /dev/disk/by-uuid /dev/bcache/by-uuid https://paste.ubuntu.com/26081756/
>>
>> They are all there originally (see the screenshot).
>>
>> But not there afterwards. So it's not just a problem with a different
>> path.
>>
>> https://paste.ubuntu.com/26081775/
>>
>> ubuntu@maas-xenial4:~$ tree /dev/ | grep bcache
>> ├── bcache0
>> ├── bcache1
>> ├── bcache2
>> ├── bcache3
>> │ ├── 251:0 -> ../bcache0
>> │ ├── 251:1 -> ../bcache1
>> │ ├── 251:2 -> ../bcache2
>> │ ├── 251:3 -> ../bcache3
>> │ │ ├── bcache0 -> ../../bcache0
>> │ │ ├── bcache1 -> ../../bcache1
>> │ │ ├── bcache2 -> ../../bcache2
>> │ │ ├── bcache3 -> ../../bcache3
>>
>>
>> ** Attachment added: "bcache-multiple-links.png"
>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/172914
>> 5/+attachment/5016592/+files/bcache-multiple-links.png
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1729145
>>
>> Title:
>> /dev/bcache/by-uuid links not created after reboot
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1729145
>> /+subscriptions
>>
>
>
Investigating why /dev doesn't have the correct links even if they're initramfs- tools/scripts/ init-bottom/ udev (provided via the udev
present led me to look at
/usr/share/
dpkg from systemd)
In there, the mount -n -o move is used to migrate the /dev from initramfs
to the rootfs/dev
This bug: /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 844775
https:/
Indicated that the initramfs may have util-linux version of mount which
needs to use
mount --move instead. This is addressed in newer systemd packages (in
bionic for sure)
And the mount line now looks like this:
# move the /dev tmpfs to the rootfs; fall back to util-linux mount that does
# not understand -o move
mount -n -o move /dev ${rootmnt}/dev || mount -n --move /dev ${rootmnt}/dev
Let's see if that helps resolve the "missing" symlinks.
On Thu, Nov 30, 2017 at 10:27 AM, Ryan Harper <email address hidden>
wrote:
> So, /dev/bcache/by-uuid is not getting created. /paste. ubuntu. com/26081756/ /paste. ubuntu. com/26081775/ maas-xenial4: ~$ tree /dev/ | grep bcache multiple- links.png" /bugs.launchpad .net/ubuntu/ +source/ linux/+ bug/172914 5016592/ +files/ bcache- multiple- links.png /bugs.launchpad .net/bugs/ 1729145 /bugs.launchpad .net/ubuntu/ +source/ linux/+ bug/1729145
>
> That's the same kernel bug I filed.
>
> And, if they were, I think they'd get moved properly.
>
> init-bottom/udev script does the following:
>
> # Stop udevd, we'll miss a few events while we run init, but we catch up
> udevadm control --exit
>
> # move the /dev tmpfs to the rootfs
> mount -n -o move /dev ${rootmnt}/dev
>
> That "move" operation migrates the entire mounted directory to a new
> location
> so, if /dev/bcache/by-uuid existed, it would be present when systemd init
> runs.
>
> AFAICT, there's not fix here without the kernel side.
>
> On Thu, Nov 30, 2017 at 10:09 AM, Dmitrii Shcherbakov <
> <email address hidden>> wrote:
>
>> Just in case also checked with this rule that creates links at /dev
>> /dev/disk/by-uuid /dev/bcache/by-uuid https:/
>>
>> They are all there originally (see the screenshot).
>>
>> But not there afterwards. So it's not just a problem with a different
>> path.
>>
>> https:/
>>
>> ubuntu@
>> ├── bcache0
>> ├── bcache1
>> ├── bcache2
>> ├── bcache3
>> │ ├── 251:0 -> ../bcache0
>> │ ├── 251:1 -> ../bcache1
>> │ ├── 251:2 -> ../bcache2
>> │ ├── 251:3 -> ../bcache3
>> │ │ ├── bcache0 -> ../../bcache0
>> │ │ ├── bcache1 -> ../../bcache1
>> │ │ ├── bcache2 -> ../../bcache2
>> │ │ ├── bcache3 -> ../../bcache3
>>
>>
>> ** Attachment added: "bcache-
>> https:/
>> 5/+attachment/
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https:/
>>
>> Title:
>> /dev/bcache/by-uuid links not created after reboot
>>
>> To manage notifications about this bug go to:
>> https:/
>> /+subscriptions
>>
>
>