我有一个具有大量数据的虚拟机,接近 800GB。我正在对该虚拟机进行 vzdump。在 vzdump 期间,openvz 会挂起虚拟机并执行检查点并在完成 vzdump 操作之前执行最终数据同步。请参阅下面的日志。
问题是,最终的sycn需要很多时间。已经过去了4个多小时,在此期间,我的VM处于挂起状态。我可以在 vzdump 仍在进行时重新启动虚拟机吗(主要是最终同步)
我不希望虚拟机长时间挂起(不可用)。
请找到下面的日志......
INFO: Starting new backup job - vzdump --compress --dumpdir /Server-Backup --tmpdir /Server-Backup/data --suspend 196
INFO: Starting Backup of VM 196 (openvz)
INFO: status = CTID 196 exist mounted running
INFO: starting first sync /vz/private/196 to /Server-Backup/data/vzdumptmp811041
INFO: Number of files: 5
INFO: Number of files transferred: 3
INFO: Total file size: 1002097869596 bytes
INFO: Total transferred file size: 1002097869596 bytes
INFO: Literal data: 1002097869596 bytes
INFO: Matched data: 0 bytes
INFO: File list size: 125
INFO: File list generation time: 0.001 seconds
INFO: File list transfer time: 0.000 seconds
INFO: Total bytes sent: 1002220196263
INFO: Total bytes received: 77
INFO: sent 1002220196263 bytes received 77 bytes 9822943.55 bytes/sec
INFO: total size is 1002097869596 speedup is 1.00
INFO: first sync finished (102028 seconds)
INFO: suspend vps
INFO: Setting up checkpoint...
INFO: suspend...
INFO: get context...
INFO: Checkpointing completed successfully
INFO: final sync /vz/private/196 to /Server-Backup/data/vzdumptmp811041
最终同步命令卡住了4个多小时
答案1
问题的解决办法是,
- 我们杀死了由 vzdump 启动的 rsync 进程(有两个)
- 一旦我们杀死 rsync,vzdump 进程就退出了
- 之后,恢复/停止/启动虚拟机不起作用
- vzctl chkpnt VEID --resume (此命令有助于启动虚拟机)