Zarquan / ischnura

Shell scripts to manage KVM
1 stars 0 forks source link

Duplicate volumes #14

Open Zarquan opened 7 years ago

Zarquan commented 7 years ago

An odd bug in libvirt returns multiple duplicates in the list of volumes.

Found a reference to similar behaviour in Redhat bugzilla entry 1176510, but this was from 2014/2015 and no follow up since .

We are now encountering the same issue on an up to date install of Debian 8.6.

Zarquan commented 7 years ago

Sort term fix is to filter the list through sort.

virsh --c "${connection:?}" vol-list --pool "${basepool}"  > "${tempdat}"

becomes

virsh --c "${connection:?}" vol-list --pool "${basepool}" | sort --unique > "${tempdat}"