[pve-devel] [PATCH container v2] Fix: fsck: rbd volume not mapped
Alwin Antreich
a.antreich at proxmox.com
Fri Jan 17 14:25:04 CET 2020
Signed-off-by: Alwin Antreich <a.antreich at 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);
--
2.20.1
More information about the pve-devel
mailing list