mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 11:46:49 +00:00
fix(migrate): a disk of an LVM or disk pool does not count as shared with the destination
Each host's logical volumes are its own: a VM whose disk is /dev/vg/x migrated, uncopied, onto the destination's volume of the same name and kept running on other data. Such a volume now counts as missing there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
parent
eb0343ee2f
commit
c2c255a866
3 changed files with 24 additions and 4 deletions
|
|
@ -454,6 +454,8 @@ class wvmInstances(wvmConnect):
|
|||
them), CD-ROM images, block devices and pool volumes. Network disks
|
||||
(RBD, iSCSI, ...) are reached the same way from every host and are not
|
||||
checked; other types (dir, nvme, ...) cannot be and count as missing.
|
||||
A volume of an LVM or disk pool here counts as missing too: such
|
||||
storage is each host's own, and one of the same name is other data.
|
||||
Pools are refreshed before a disk counts as missing, as a file another
|
||||
host made on shared storage is listed after that."""
|
||||
disks = {}
|
||||
|
|
@ -483,7 +485,8 @@ class wvmInstances(wvmConnect):
|
|||
continue
|
||||
checked.add(key)
|
||||
volume = self.find_volume(*key)
|
||||
if volume is None:
|
||||
if volume is None or ElementTree.fromstring(
|
||||
volume.storagePoolLookupByVolume().XMLDesc(0)).get("type") in ("logical", "disk"):
|
||||
unseen.append((target, key))
|
||||
continue
|
||||
backing = ElementTree.fromstring(volume.XMLDesc(0)).findtext("backingStore/path")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue