Read-only VM with stdout

rafael.silva

Member
Apr 10, 2022
2
0
6
Hi,

I backup some VMs using SSH with vzdump redirecting to stdout, similar to the command below:
ssh root@pve-server vzdump 100 --mode snapshot $VZDUMP_PARAMETERS --stdout > ${SERVER}_${NAME}_$(date +%Y-%m-%d).vma 2> >(tee -a ${SERVER}_${NAME}_$(date +%Y-%m-%d).log >&2)

But I noticed that if the connection goes offline, the machine being dumped starts to show erros and becomes read-only system.

Is it possible to prevent this from happening?

Thanks.
 

Attachments

This is because backup is implemented as a shim for write activity. During the backup if client/VM tries to write to disk and that block has not been backed up yet (based on dirty bitmap), PVE will try to backup that block out of order to get a consistent backup view.
In essence, backup connection is in critical path of a write. With IO blocked on write the OS/Kernel will wait for a bit and after a timeout convert the disk to RO as a precaution.
The only short term solution is to have a rock solid backup server and connectivity to it. The ideal solution would be to offload saving the blocks to snapshots on the backend storage.


Blockbridge: Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: rafael.silva