[pve-devel] applied: [PATCH qemu-server] Fix #1650: add content type filter to rescan

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jul 5 10:58:40 CEST 2018


On 7/3/18 5:41 PM, Alwin Antreich wrote:
> Unused disk(s) appeared after a rescan of storages. Especially shown
> with ceph pools, where two storage entries are made, <storage>_ct and
> <storage>_vm. The rescan method did include images from both storages.
> 
> This patch filters any storage not containing the content type 'images'.
> 
> Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
> ---
>  PVE/QemuServer.pm | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index d6efb3a..f07ad3a 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -5606,6 +5606,10 @@ sub rescan {
>  
>      my $cfg = PVE::Storage::config();
>  
> +    foreach my $stor (keys %{$cfg->{ids}}) {
> +	delete($cfg->{ids}->{$stor}) if ! $cfg->{ids}->{$stor}->{content}->{images};
> +    }
> +
>      my $volid_hash = scan_volids($cfg, $vmid);
>  
>      my $updatefn =  sub {
> 

applied this with a comment that we want to remove it once we have
a solution for the CT/VM on same RBD storage in PVE problem.




More information about the pve-devel mailing list