From: Markus Frank <m.frank@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH container] fix #3917: Ignore fstrim failure in pct fstrim
Date: Fri, 11 Mar 2022 12:59:57 +0100 [thread overview]
Message-ID: <20220311115957.230514-1-m.frank@proxmox.com> (raw)
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
next reply other threads:[~2022-03-11 12:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-11 11:59 Markus Frank [this message]
2022-03-16 16:05 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220311115957.230514-1-m.frank@proxmox.com \
--to=m.frank@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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