Optimize Volume.refresh flow #169
Labels
enhancement
Enhancing the system by adding new feature or improving performance or reliability
storage
virt
When finishing extend flow we refresh the volume using storage API: Volume.refresh.
Refreshing takes 25% of total extend time, and creates lots of I/O since lvm
must read entire vg metadata twice.
Volume.refresh does:
In the logs we see that for every call we run "lvs" - reading entire vg metadata
from storage. The lvs command always succeeds with a warning:
The warning is likely expected and can be suppressed, but we really should not run
lvs for every call.
All this flow is pointless since call this from running VM context. We know
that the logical volume exist and active, so we should really call only:
Volume.refresh() does nothing for file volume, so callers should not call this API
with file volumes.
Example log:
Fix:
The text was updated successfully, but these errors were encountered: