Comment 0 for bug 1581801

Revision history for this message
Hiroo MATSUMOTO (hiroom2-mail) wrote :

Ubuntu 16.04 with LVM have delay around LVM mount.

  $ dmesg
  [ 1.126338] FDC 0 is a S82078B
  [ 1.830136] tsc: Refined TSC clocksource calibration: 3392.321 MHz
  [ 1.830140] clocksource: tsc: mask: 0xffffffffffffffff max_cycles:
  0x30e5f904771, max_idle_ns: 440795373543 ns
  [ 6.984151] EXT4-fs (dm-0): mounted filesystem with ordered data
  mode. Opts: (null)
  [ 10.421370] systemd[1]: systemd 229 running in system mode.
  [ 10.421397] systemd[1]: Detected virtualization kvm.

LVM partition will be activated by scripts/local-top/lvm2 in initrd.
But scripts/local-top/lvm2 does not take care of resume variable which
is set from UUID base RESUME.

  $ cat /usr/share/initramfs-tools/scripts/local-top/lvm2
  activate() {

  activate "$ROOT"
  activate "$resume"

And then, scripts/local-premount/resume in initrd will always wait 5
seconds for activating LVM swap.
After mounting root filesystem, systemd will activate LVM swap.

  $ cat /usr/share/initramfs-tools/scripts/local-premount/resume
  SWAPTYPE=$(wait-for-root "${resume}" ${RESUMEDELAY:-5})

RESUME is defined at /etc/initramfs-tools/conf.d/resume which is
created by
So needs to support non-UUID base RESUME,
e.g. RESUME=/dev/mapper/ubuntu--vg-swap_1.