LVM2-ACTIVATION-GENERATOR(8)

πŸ“¦ version 2.03.11, in ubuntu jammy

πŸ’– LVM2-ACTIVATION-GENERATOR(8) πŸ’–

ok bestie, welcome to lvm2-activation-generator β€” it's a little systemd generator that makes LVM volumes show up on boot. that's the whole vibe. it lives in the LVM2-ACTIVATION-GENERATOR(8) section of your manual, and no cap, it's lowkey iconic for how much it does while saying almost nothing. πŸ¦‹


✨ SYNOPSIS ✨

/lib/systemd/system-generators/lvm2-activation-generator

that's it. no flags, no args, no drama. she just is. πŸ’…


🌸 DESCRIPTION 🌸

okay so here's the tea. lvm2-activation-generator gets called by systemd(1) on boot, and its whole job is to generate systemd units at runtime so your LVM Logical Volumes (LVs) actually get activated. but β€” and this is the plot twist β€” it only does that when global/event_activation=0 is set in lvm.conf(5). when that condition hits, the units it generates use vgchange -aay to bring those LVs to life. periodt. πŸ”₯

but if event_activation=1? mm, she's out. lvm2-activation-generator exits immediately and generates zero systemd units, and LVM just fully trusts event-based activation to handle everything. in that case it's the event-generated pvscan --cache -aay commands doing the activating. different girlboss, same job. ✨


πŸŽ€ the units she generates πŸŽ€

these are the systemd units that come out of lvm2-activation-generator, and bestie they each have a very specific moment:

  • lvm2-activation-early.service β€” runs before systemd's special cryptsetup.target, to activate LVs that are not layered on top of encrypted devices. early bird energy. 🐦
  • lvm2-activation.service β€” runs after systemd's special cryptsetup.target, to activate LVs that are layered on top of encrypted devices. she waits her turn, respectfully. πŸ™ˆ
  • lvm2-activation-net.service β€” runs after systemd's special remote-fs-pre.target, to activate LVs that are layered on attached remote devices. network girlie. 🌈
⚠️ okay important note bestie, do not skip this one: all the underlying LVM devices (Physical Volumes) need to be present when the service is run. if there are any devices that show up to the system later, the LVs using those devices have to be activated directly by lvchange(8) or vgchange(8). no generator magic for latecomers, sorry. 😭

and one more flex: lvm2-activation-generator implements the Generators Specification as referenced in systemd(1). she follows the rules, she's a good citizen. πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

lvm.conf(5) vgchange(8) lvchange(8) pvscan(8) udev(7) systemd(1) systemd.target(5) systemd.special(7)

go read those if you want the full lore, iykyk. πŸ’œ


made with love by Red Hat, Inc, version LVM TOOLS 2.03.11(2), dated 2021- (yeah the date got a lil chopped in the footer, we don't talk about it πŸ’€). stay activated, bestie. 🫢🌸

πŸ“¦ where this page comes from