all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH common/container] fix syncfs usage for snapshot backup
@ 2020-09-17 19:16 Stoiko Ivanov
  2020-09-17 19:17 ` [pve-devel] [PATCH common 1/1] sync_mountpoint: open path so that sync works Stoiko Ivanov
  2020-09-17 19:17 ` [pve-devel] [PATCH container 1/1] sync_container_namespace: skip virtual filesystems Stoiko Ivanov
  0 siblings, 2 replies; 5+ messages in thread
From: Stoiko Ivanov @ 2020-09-17 19:16 UTC (permalink / raw)
  To: pve-devel

while investigating #2991 (and probably related #1911) I straced pvedaemon
noticing that the syncfs-calls all failed (errno EBADF).

This happens because we open the mountpoint path with O_PATH (open(2)), which
causes syncfs to fail.

Since I expect syncfs failing to be a potential cause for the inconstent
state of containers on ceph-storages while backing up in snapshot mode this
patchset hopefully mitigates the reported issues.

(if this is not the solution, I was also investigating calling
ioctl(fd, FIFREEZE) on the mountpoint before creating the snapshot)

The patch to pve-container is maybe not necessary, but should save us a few
syscalls, which don't help.

Would be grateful for review from more experienced eyes - I ran limted tests
with the patches applied - creating snapshot backups on a container with
lvmthin backed rootfs and on one with ceph backed rootfs.

pve-common
Stoiko Ivanov (1):
  sync_mountpoint: open path so that sync works

 src/PVE/Tools.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

pve-container:
Stoiko Ivanov (1):
  sync_container_namespace: skip virtual filesystems

 src/PVE/LXC.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.20.1





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

end of thread, other threads:[~2020-09-18 10:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 19:16 [pve-devel] [PATCH common/container] fix syncfs usage for snapshot backup Stoiko Ivanov
2020-09-17 19:17 ` [pve-devel] [PATCH common 1/1] sync_mountpoint: open path so that sync works Stoiko Ivanov
2020-09-18 10:01   ` [pve-devel] applied: " Thomas Lamprecht
2020-09-17 19:17 ` [pve-devel] [PATCH container 1/1] sync_container_namespace: skip virtual filesystems Stoiko Ivanov
2020-09-18 10:07   ` Thomas Lamprecht

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