Skip to content

Commit

Permalink
incusd/storage/lvm: Retry setactivation skip for busy environments
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed Aug 29, 2024
1 parent ffa7ecc commit 52cd776
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/server/storage/drivers/driver_lvm_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ func (d *lvm) createLogicalVolume(vgName, thinPoolName string, vol Volume, makeT
if isRecent {
// Disable auto activation of volume on LVM versions that support it.
// Must be done after volume create so that zeroing and signature wiping can take place.
_, err := subprocess.RunCommand("lvchange", "--setactivationskip", "y", volDevPath)
_, err := subprocess.TryRunCommand("lvchange", "--setactivationskip", "y", volDevPath)
if err != nil {
return fmt.Errorf("Failed to set activation skip on LVM logical volume %q: %w", volDevPath, err)
}
Expand Down

0 comments on commit 52cd776

Please sign in to comment.