[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem: UUIDs not being used everywhere for disks in stretch



Hey folks,

On Sun, Apr 07, 2019 at 01:01:34AM +0100, Ben Hutchings wrote:
>On Sat, 2019-04-06 at 16:54 +0100, Steve McIntyre wrote:
>> Actually...
>> 
>> On Sat, Apr 06, 2019 at 04:36:59PM +0100, Steve McIntyre wrote:
>> > We need to run update-dev *after* the filesystem creation scripts and
>> > this fixes things. I've just copiet it to 99update-dev locally while
>> > testing and that made all the difference. It could probably also just
>> > be moved instead of copied - at this point I'm not sure if anything in
>> > the other scripts also depend on the udev updates for their
>> > functionality. Fundamentally, it's a fairly harmless thing to run
>> > repeatedly so I'm tempted to just run it twice. Thoughts?
>> 
>> I think we're definitely going to need this, actually - new device
>> entries may not show up otherwise.
>> 
>> I'm also seeing in my testing that I *do* need to force a "udevadm
>> trigger" in the second script. Fundametally, it you don't get new
>> kernel events when a mkfs happens so udev will never notice.
>
>Closing a block device that is opened for writing should trigger a
>change event.  I tested this now with Linux 4.19.28 and it still seems
>to happen.

OK, that's a useful thing to check - thanks!

To see WTF is going om, I've just re-run test installations of both
stretch (9.8.0) and buster (a netinst from last week). In each case,
I've started "udevadm monitor | logger -t udevmon" in the background
in the installer. I've run a basic installation through to completion,
then on first boot I've run:

 # udevadm monitor > log &
 # swapoff -av
 # mkfs.ext4 /dev/vda3

I've grepped out the udev monitor log lines from both the installer
and the installed system - see attached.

*In the installer*, we're not seeing *any* "change" events for the
hard disk (vda in my case), in either stretch or buster. We just get
the "add" and "remove" events. In the buster installer, my temporary
hack of forcing the "udevadm trigger" means that the UUIDs are updated
for Grub to use, but it's clearly not a correct final solution.

Yet... in both cases in the post-installer runtime we're getting the
"change" events when I do the mkfs.

Is udev maybe built differently for the installer, or do we have some
missing config somewhere? Digging there next.

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
"Every time you use Tcl, God kills a kitten." -- Malcolm Ray

Attachment: buster-normal-udev.log.gz
Description: application/gzip

Attachment: buster-installer-udev.log.gz
Description: application/gzip

Attachment: stretch-normal-udev.log.gz
Description: application/gzip

Attachment: stretch-installer-udev.log.gz
Description: application/gzip


Reply to: