* [pve-devel] [PATCH container] fix #3917: Ignore fstrim failure in pct fstrim
@ 2022-03-11 11:59 Markus Frank
2022-03-16 16:05 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Markus Frank @ 2022-03-11 11:59 UTC (permalink / raw)
To: pve-devel
With "noerr => 1" the function does not abort, when one of the
mountpoints is not fstrim compatible like zfs (has its own trim).
I do not think it is necessary to warn or error, because fstrim
tells when something is not trimmable and aborts.
Signed-off-by: Markus Frank <m.frank@proxmox.com>
---
src/PVE/CLI/pct.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/CLI/pct.pm b/src/PVE/CLI/pct.pm
index 462917b..23793ee 100755
--- a/src/PVE/CLI/pct.pm
+++ b/src/PVE/CLI/pct.pm
@@ -792,7 +792,7 @@ __PACKAGE__->register_method ({
$path = $mp->{mp};
return if $param->{'ignore-mountpoints'} && $name =~ /^mp\d+/;
my $cmd = ["fstrim", "-v", "$rootdir$path"];
- PVE::Tools::run_command($cmd);
+ PVE::Tools::run_command($cmd, noerr => 1);
});
};
warn $@ if $@;
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-16 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 11:59 [pve-devel] [PATCH container] fix #3917: Ignore fstrim failure in pct fstrim Markus Frank
2022-03-16 16:05 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox