[linux-lvm] Unusually long boot times with LVM Snapshots
Bryn M. Reeves
bmr at redhat.com
Fri Nov 20 11:14:33 UTC 2020
On Thu, Nov 19, 2020 at 07:46:21PM +0530, Sreyan Chakravarty wrote:
> I use LVM with full disk encryption. I also use LVM snapshots, currently I
> have a 70GB snapshot.
What type of snapshot are you using? LVM2 allows either "classic" CoW snaps,
or the newer thin provisioned snapshots using the dm-thinp target.
Classic snapshots are known to have very poor IO performance when multiple
snapshots of the same volume exist simultaneously (especially for write-
Thin provisioned snapshots are not normally activated at boot time unless
they are explicitly requested (via dracut's rd.lvm.lv options) since they
have the skip activation flag set by default.
> I boot my machine, enter my encryption passphrase and then wait for about 3
> minutes. It is only after that long wait does my machine boot.
> This only happens if snapshots are present, if no snapshots are present,
> boot is almost instantaneous after I enter my passphrase.
Is there any indication in the log of what's happening during the delay?
Look through the journalctl output to see if there are any messages logged
while the delay happens.
Another option is to use systemd-analyze to look into where the time is
going during boot. It has various commands including "plot" which will
generate an SVG plot of the boot timings on stdout. You can then compare
that with a regular boot to try to understand the difference.
More information about the linux-lvm