Skip to content

Do not activate not currently used LVM volumes #6184

@marmarek

Description

@marmarek

The problem you're addressing (if any)

Active LVM volumes takes some kernel resources, but also activating them takes time. Active volumes also require more locking on LVM side when handling them - for example when creating a snapshot (volume clone) if source volume is active, it needs to be suspended. This takes time.

Describe the solution you'd like

Keep active only volumes currently in use by a running VM. Others should be inactive. LVM thin snapshots are inactive by default, unless explicitly requested to be activated (we the current LVM storage pool driver does). This require following change:

  • drop -kn and -ay options from lvcreate call
  • add lvchange -ay call in the VM start path
  • add lvchange -an call in the VM shutdown path

Where is the value to a user, and who might that user be?

Less resources used in dom0. Faster VM startup/shutdown time.

Relevant documentation you've consulted

https://dev.qubes-os.org/projects/core-admin/en/latest/qubes-storage.html

Related, non-duplicate issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: coreThis issue pertains to a Qubes core component.C: storageThis issue pertains to storage in Qubes OS.P: defaultPriority: default. Default priority for new issues, to be replaced given sufficient information.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions