From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id E3CAE6C8A6 for ; Mon, 1 Feb 2021 09:07:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D212721FD6 for ; Mon, 1 Feb 2021 09:07:14 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 2C24621FCD for ; Mon, 1 Feb 2021 09:07:14 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E56E54250E for ; Mon, 1 Feb 2021 09:07:13 +0100 (CET) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Mon, 1 Feb 2021 09:07:12 +0100 Message-Id: <20210201080712.28074-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.240 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup] garbage_collection: only ignore 'missing chunk' errors X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2021 08:07:44 -0000 with the fix for #2909 (improving handling missing chunks), we changed from bailing to warning during a garbage collection when updating the atime of a chunk. but, updating the atime can not only fail when the chunk is missing, but also on other occasions, e.g. no permissions or more importantly, no space left on the device. in that case, the atime of a valid and used chunk cannot be updated, and the second sweep of the gc will remove that chunk. [0] is a real world example of that happening. instead, only warn on really missin chunks, and bail on all other errors. 0: https://forum.proxmox.com/threads/pbs-server-full-two-days-later-almost-empty.83274/ Signed-off-by: Dominik Csapak --- this can easily be tested by marking a chunk immutable with 'chattr +i ' before that patch, the worker will warn and going over to the second phase, with this patch, we will abort the gc src/backup/datastore.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs index fae7ff25..f8298ae8 100644 --- a/src/backup/datastore.rs +++ b/src/backup/datastore.rs @@ -445,13 +445,12 @@ impl DataStore { worker.check_abort()?; tools::fail_on_shutdown()?; let digest = index.index_digest(pos).unwrap(); - if let Err(err) = self.chunk_store.touch_chunk(digest) { + if !self.chunk_store.cond_touch_chunk(digest, false)? { crate::task_warn!( worker, - "warning: unable to access chunk {}, required by {:?} - {}", + "warning: unable to access non-existant chunk {}, required by {:?}", proxmox::tools::digest_to_hex(digest), file_name, - err, ); // touch any corresponding .bad files to keep them around, meaning if a chunk is -- 2.20.1