proxmox-backup/src
Christian Ebner b18eab64a9 fix #5982: garbage collection: check atime updates are honored
Check if the filesystem backing the chunk store actually updates the
atime to avoid potential data loss in phase 2 of garbage collection,
in case the atime update is not honored.

Perform the check before phase 1 of garbage collection, as well as
on datastore creation. The latter to early detect and disallow
datastore creation on filesystem configurations which otherwise most
likely would lead to data losses. To perform the check also when
reusing an existing datastore, open the chunks store also on reuse.

Enable the atime update check by default, but allow to opt-out by
setting a datastore tuning parameter flag for backwards compatibility.
This is honored by both, garbage collection and datastore creation.

The check uses a 4 MiB fixed sized, unencypted and compressed chunk
as test marker, inserted if not present. This all zero-chunk is very
likely anyways for unencrypted backup contents with large all-zero
regions using fixed size chunking (e.g. VMs).

To avoid cases were the timestamp will not be updated because of the
Linux kernels timestamp granularity, sleep in-between chunk insert
(including an atime update if pre-existing) and the subsequent
stating + utimensat for 1 second.

Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=5982
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2025-04-05 13:18:22 +02:00
..
acme hyper: start preparing upgrade to 1.x 2025-03-13 13:23:48 +01:00
api2 fix #5982: garbage collection: check atime updates are honored 2025-04-05 13:18:22 +02:00
backup fix #3935: datastore/api/backup: move datastore locking to '/run' 2025-03-26 16:21:43 +01:00
bin garbage collection: format error including anyhow error context 2025-04-02 19:57:51 +02:00
config clippy/fmt: tree wide drop of clone for types implementing copy 2025-03-20 14:48:31 +01:00
server server: pull: refactor snapshot pull logic 2025-04-02 15:29:49 +02:00
tape tape: introduce a tape backup job worker thread option 2025-04-02 16:45:14 +02:00
tools clippy/fmt: tree wide drop of clone for types implementing copy 2025-03-20 14:48:31 +01:00
auth_helpers.rs auth: use auth-api when generating keys and generate ec keys 2024-05-22 16:04:21 +02:00
auth.rs auth: doc: Explicitly set namespace for UserInfomation 2024-12-04 14:40:42 +01:00
client_helpers.rs provide separate helpers for pub/priv auth keyring access 2023-03-29 14:37:45 +02:00
lib.rs metric collection: move rrd_cache to new metric_collection module 2024-10-15 14:09:41 +02:00
traffic_control_cache.rs backup: remove lazy_static dependency 2024-08-14 12:08:01 +02:00