Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage/lvm: allow starting a VM even if not all its volumes are active
Normally, VM gets snapshots of its volumes anyway, so it makes little sense to enforce they are already active. This requires several changes: 1. Including inactive volumes in the size_cache (those will have 0 as usage, because inactive do not report usage). 2. Do not check if volume is active in the verify() function. 3. With the above changed, adjust checking for volume existence by looking at size_cache instead of /dev/ node existence. For now do this in code paths related to VM startup. 4. In the rare case of not using snapshot (or new volatile volume) do activate the volume if needed. Do not deactivate volumes on stop to not lose information about usage. All that should solve an issue when qubesd (and possibly some VMs) are started while LVM is still activating volumes. A simpler (and more reliable) solution would be to order qubesd.service after activating all (present at boot) volumes, but unfortunately current LVM + systemd integration doesn't provide anything to set such ordering.
- Loading branch information