neil / rpms / python-blivet

Forked from rpms/python-blivet a year ago
Clone

Blame SOURCES/0023-Use-LVM-PV-format-current_size-in-LVMVolumeGroupDevi.patch

1c4b60
From 4103df5ddaae49d51640d01502e8456409a92be9 Mon Sep 17 00:00:00 2001
1c4b60
From: Vojtech Trefny <vtrefny@redhat.com>
1c4b60
Date: Thu, 5 May 2022 16:35:37 +0200
1c4b60
Subject: [PATCH] Use LVM PV format current_size in
1c4b60
 LVMVolumeGroupDevice._remove
1c4b60
1c4b60
The member format size is 0 when target size is not set.
1c4b60
1c4b60
Related: rhbz#2081278
1c4b60
---
1c4b60
 blivet/devices/lvm.py | 2 +-
1c4b60
 1 file changed, 1 insertion(+), 1 deletion(-)
1c4b60
1c4b60
diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py
1c4b60
index feb92f2e..facb1b76 100644
1c4b60
--- a/blivet/devices/lvm.py
1c4b60
+++ b/blivet/devices/lvm.py
1c4b60
@@ -289,7 +289,7 @@ class LVMVolumeGroupDevice(ContainerDevice):
1c4b60
 
1c4b60
         # do not run pvmove on empty PVs
1c4b60
         member.format.update_size_info()
1c4b60
-        if member.format.free < member.format.size:
1c4b60
+        if member.format.free < member.format.current_size:
1c4b60
             blockdev.lvm.pvmove(member.path)
1c4b60
         blockdev.lvm.vgreduce(self.name, member.path)
1c4b60
 
1c4b60
-- 
1c4b60
2.34.3
1c4b60