[pve-devel] [PATCH container] Fix: fsck: rbd volume not mapped
Alwin Antreich
a.antreich at proxmox.com
Mon Jan 13 12:04:56 CET 2020
Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
---
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..9dee68d 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);
};
PVE::LXC::Config->lock_config($vmid, $do_fsck);
--
2.20.1
More information about the pve-devel
mailing list