]> git.proxmox.com Git - pve-container.git/commit
snapshot creation: fsfreeze mountpoints, if needed
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 6 Nov 2020 14:19:42 +0000 (15:19 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Nov 2020 17:59:07 +0000 (18:59 +0100)
commit8463099d99273561c46398bf02206b4d9d431bc5
treeea789e6a35faedd9ecfa496fb732b9274e9d57ad
parent40cd2e8941bebd8c0e56c1eed3b0435d6f3207b1
snapshot creation: fsfreeze mountpoints, if needed

fixes #2991, #2528.

creating a snapshot with rbd, after the syncfs finished successfully does not
guarantee that the snapshot has the state of the filesystem after syncfs.

suggestion taken from #2528 (running fsfreeze -f/-u before snapshotting on
the mountpoints)

added helper PVE::Storage::volume_snapshot_needs_fsfreeze, to indicate
which volumes need to be frozen/thawed. (and mocked it in the tests here).

Added the freeze to sync_container_namespace, since it needs to run inside the
container's mount namespace.

unfreezing happens in a sub of its own.

tests in #2991 seem to indicate that this helps to successfully create backups.

needs a versioned dependency bump on pve-storage

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PVE/LXC/Config.pm
src/test/snapshot-test.pm