--- pyanaconda/storage/devices.py | 1 - pyanaconda/storage/devicetree.py | 4 ++++ pyanaconda/ui/gui/spokes/custom.py | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/storage/devices.py b/pyanaconda/storage/devices.py index f0ebc64..e465c2d 100644 --- a/pyanaconda/storage/devices.py +++ b/pyanaconda/storage/devices.py @@ -4113,5 +4113,4 @@ class BTRFSSubVolumeDevice(BTRFSDevice): if not mountpoint: raise RuntimeError("btrfs subvol destroy requires mounted volume") btrfs.delete_subvolume(mountpoint, self.name) - self.volume._removeSubVolume(self.name) self.volume._undo_temp_mount() diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py index 6c531ff..3fad2c7 100644 --- a/pyanaconda/storage/devicetree.py +++ b/pyanaconda/storage/devicetree.py @@ -392,6 +392,10 @@ class DeviceTree(object): if isinstance(device, PartitionDevice) and \ device.disk == dev.disk: device.updateName() + elif hasattr(dev, "vg"): + dev.vg._removeLogVol(dev) + elif hasattr(dev, "volume"): + dev.volume._removeSubVolume(dev.name)
self._devices.remove(dev) if dev.name in self.names: diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index ed1a0d1..d4cc35e 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -1649,12 +1649,10 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): # should this be in DeviceTree._removeDevice? container = None if hasattr(device, "vg"): - device.vg._removeLogVol(device) container = device.vg device_type = DEVICE_TYPE_LVM raid_level = None elif hasattr(device, "volume"): - device.volume._removeSubVolume(device.name) container = device.volume device_type = DEVICE_TYPE_BTRFS raid_level = container.dataLevel