all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH common/storage/container] add fsfreeze/thaw for rbd snapshots
@ 2020-11-05 16:06 Stoiko Ivanov
  2020-11-05 16:06 ` [pve-devel] [PATCH common] add fsfreeze helper: Stoiko Ivanov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stoiko Ivanov @ 2020-11-05 16:06 UTC (permalink / raw)
  To: pve-devel

this patchset addresses #2991 and #2528.

As discussed in #2991 (and off-list with Wolfgang B. and Dominik) - it does
not address the fundamental problem of the snapshot being created outside of
the open krbd block-device, by an independend 'rbd' call (which is most likely
the reason for the inconsistency).

However according to the reporter in #2991 it does help in their case to
actually get backups of their containers.

I put the ioctl call inside sync_container_namespace since it:
* should happen shortly after the syncfs call
* needs to happen inside the container's mount namespace (else we'd need to
  mount the filesystem in order to freeze/thaw it - see the proposed patch
  in #2528)

and I wanted to avoid to fork+nsenter for each volume twice (in
__snapshot_create_vol_snapshs_hook)

Would be grateful for feedback if this approach is ok (reading containerconfig
+ storage config in __snapshot_freeze) or if some other way would be nicer.

Tested on my testsetup with a ceph-backed container (and 2 additional
mountpoints (one ceph, one on LVM thin).


pve-common:
Stoiko Ivanov (1):
  add fsfreeze helper:

 src/PVE/Tools.pm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

pve-storage:
Stoiko Ivanov (1):
  add check for fsfreeze before snapshot

 PVE/Storage.pm           | 12 ++++++++++++
 PVE/Storage/Plugin.pm    |  4 ++++
 PVE/Storage/RBDPlugin.pm |  5 +++++
 3 files changed, 21 insertions(+)

pve-container:
Stoiko Ivanov (1):
  snapshot creation: fsfreeze mountpoints, if needed

 src/PVE/LXC.pm            | 21 +++++++++++++++++----
 src/PVE/LXC/Config.pm     | 15 ++++++++++++++-
 src/test/snapshot-test.pm | 12 +++++++++++-
 3 files changed, 42 insertions(+), 6 deletions(-)

-- 
2.20.1





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-05 18:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-05 16:06 [pve-devel] [PATCH common/storage/container] add fsfreeze/thaw for rbd snapshots Stoiko Ivanov
2020-11-05 16:06 ` [pve-devel] [PATCH common] add fsfreeze helper: Stoiko Ivanov
2020-11-05 16:06 ` [pve-devel] [PATCH storage 1/1] add check for fsfreeze before snapshot Stoiko Ivanov
2020-11-05 18:00   ` Thomas Lamprecht
2020-11-05 16:06 ` [pve-devel] [PATCH container 1/1] snapshot creation: fsfreeze mountpoints, if needed Stoiko Ivanov

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