Comment 34 for bug 2000226

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

Since systemd-252, calling lvextend on /home or /srv will sometimes
(~20%) cause the volume to be unmounted, here is the logging sequence:

growvols[2428]: [INFO] Running: lvextend --size +17200840704B /dev/mapper/vg-lv_srv
dmeventd[775]: No longer monitoring thin pool vg-lv_thinpool-tpool.
kernel: dm-10: detected capacity change from 98304 to 33693696
systemd[1]: Stopped target Local File Systems.
systemd[1]: Unmounting /srv...
kernel: XFS (dm-10): Unmounting Filesystem
dmeventd[775]: Monitoring thin pool vg-lv_thinpool-tpool.
systemd[1]: srv.mount: Deactivated successfully.
systemd[1]: Unmounted /srv.
systemd[1]: systemd-fsck@dev-disk-by\x2dlabel-fs_srv.service: Deactivated successfully.
systemd[1]: Stopped File System Check on /dev/disk/by-label/fs_srv.
growvols[2428]: [DEBUG] Result: Size of logical volume vg/lv_srv changed from 48.00 MiB (12 extents) to <16.07 GiB (4113 extents).
growvols[2428]: Logical volume vg/lv_srv successfully resized.

The event "Stopped target Local File Systems." should only happen
when dmeventd notifies that the thin pool is near capacity as a safety
measure, which is clearly not the case:

$ lvs
  LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
  lv_audit vg Vwi-aotz-- <2.05g lv_thinpool 0.62
  lv_home vg Vwi-aotz-- 1.16g lv_thinpool 0.88
  lv_log vg Vwi-aotz-- <9.55g lv_thinpool 0.31
  lv_root vg Vwi-aotz-- <11.07g lv_thinpool 18.97
  lv_srv vg Vwi-aotz-- <16.07g lv_thinpool 0.31
  lv_thinpool vg twi-aotz-- 77.92g 3.36 1.68
  lv_tmp vg Vwi-aotz-- 1.16g lv_thinpool 0.88
  lv_var vg Vwi-aotz-- <37.43g lv_thinpool 1.10

I speculate that the root cause is that systemd-252 is interpreting
messages from dmeventd differently since systemd-250 and either the
message or the interpretation is incorrect.

I've proposed [1] in an attempt to prevent dmeventd from being called at all during lvextend, I'll leave it testing overnight.

[1] https://review.opendev.org/c/openstack/diskimage-builder/+/869274