Thanks for this.
I wonder if there is a way to increase the udev timeout, so we can avoid having the pvscan process killed in the first place.
Code:1. pvscan is started by the udev 69-lvm-metad.rules. 2. pvscan activates XYZ_tmeta and XYZ_tdata. 3. pvscan starts thin_check for the pool and waits for it to complete. 4. The timeout enforced by udev is hit and pvscan is killed. 5. Some time later, thin_check completes, but the activation of the thin pool never completes.
EDIT: INCREASING THE UDEV TIMEOUT DOES WORK
The boot did take longer, but it did not fail.
I have set the timeout to 600s (10min). Default is 180s (3min).
Some people may need even more time, depending on how many disks and pools they have, but above 10min I would just use --skip-mappings
Edited
AddedCode:# nano /etc/udev/udev.conf
Then I disabled the --skip-mappings option in lvm.conf, by commenting itCode:event_timeout=600
(you may skip this step if you haven't changed your lvm.conf file)
DisabledCode:# nano /etc/lvm/lvm.conf
Then updated initramfs again with both changesCode:# thin_check_options = [ "-q", "--skip-mappings" ]
And rebooted to test and it worked.Code:# update-initramfs -u
I think I prefer it this way. The server should not be rebooted frequently anyways. It is a longer boot with more through tests (not sure why it takes so long though).
Testing here, it took about 2m20s for the first pool to appear on the screen as "found" and 3m17s for all the pools to load. Then the boot quickly finished and the system was online. In my case, I was just above the 3min limit.
EDIT2: I wonder if there is some optimization I can do to the metadata of the pool to make this better. Also, one of my pools has two 2TB disks, but the metadata is only in one of them (it was expanded to the second disk). Not sure if this matters, but this seems to be the slow pool to check/mount.
Anyways, hope this helps someone.
Cheers"
#1 comment, this is what solved it for me. Pemanent fix. It is not "fast" but at least, if I plan a 10 minutes downtime when I update the server, I'm OK with it. Thanks for that info, really helpful!