all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [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

* [pve-devel] applied: [PATCH container] fix #3917: Ignore fstrim failure in pct fstrim
  2022-03-11 11:59 [pve-devel] [PATCH container] fix #3917: Ignore fstrim failure in pct fstrim Markus Frank
@ 2022-03-16 16:05 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2022-03-16 16:05 UTC (permalink / raw)
  To: Proxmox VE development discussion, Markus Frank

On 11.03.22 12:59, Markus Frank wrote:
> 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(-)
> 
>

applied, thanks!




^ 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal