On 1/17/20 2:25 PM, Alwin Antreich wrote:
> Signed-off-by: Alwin Antreich <a.antre...@proxmox.com>
> ---
> V1 -> V2: run unmap only if it has a storage id.
> 
>  src/PVE/CLI/pct.pm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/PVE/CLI/pct.pm b/src/PVE/CLI/pct.pm
> index 98e2c6e..ec071c5 100755
> --- a/src/PVE/CLI/pct.pm
> +++ b/src/PVE/CLI/pct.pm
> @@ -247,7 +247,7 @@ __PACKAGE__->register_method ({
>               die "unable to run fsck for '$volid' (format == $format)\n"
>                   if $format ne 'raw';
>  
> -             $path = PVE::Storage::path($storage_cfg, $volid);
> +             $path = PVE::Storage::map_volume($storage_cfg, $volid);
>  
>           } else {
>               if (($volid =~ m|^/.+|) && (-b $volid)) {
> @@ -264,6 +264,7 @@ __PACKAGE__->register_method ({
>               die "cannot run fsck on active container\n";
>  
>           PVE::Tools::run_command($command);
> +         PVE::Storage::unmap_volume($storage_cfg, $volid) if $storage_id;
>       };
>  
>       PVE::LXC::Config->lock_config($vmid, $do_fsck);
> 

applied this one ten days ago, forgot to reply that - sorry & thanks :)

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to