无法在NFS文件夹之间复制大量文件
我正在尝试使用Linux的rsync
命令在Python3中复制2个NFS安装量之间的巨大文件(370 GB):
file_src = "/mnt/nfs1/file1.zip"
file_dst = "/mnt2/nfs2/"
subprocess.call(["rsync", "-avu", "--progress", "--whole-file", file_src, file_dst])
几个小时后,我在日志中看到了:
373,621,623,053 100% 27.78MB/s 3:33:45 (xfr#1, to-chk=0/1)
但是当我转到DST文件夹时, file_dst
不存在。
该程序也被杀(无原木)。
为什么文件未复制?有没有更好的方法可以使用Linux/Python复制文件?
I'm trying to copy huge file (370 GB) between 2 NFS mounts using linux's rsync
command in python3:
file_src = "/mnt/nfs1/file1.zip"
file_dst = "/mnt2/nfs2/"
subprocess.call(["rsync", "-avu", "--progress", "--whole-file", file_src, file_dst])
and after few hours I saw in the logs:
373,621,623,053 100% 27.78MB/s 3:33:45 (xfr#1, to-chk=0/1)
But when I go to the dst folder, the file_dst
doesn't exists.
Also the program killed (without logs).
Why the file isn't copied? Is there a better way to copy the file using linux/python?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你发表了评论
这表明您不知道
远程路径末端的“/”表单告诉RSYNC期望NFS2已经存在,并且不会创建该目录。
如果删除该尾声“/”,则将创建目录NFS2。
当Rsync将传输缓冲区填充到最大限制时,它可能会失败,而无需通过在遥控器上写入磁盘来空。
You made the comment
That suggest that you are not aware that the form
with the "/" at the end of the remote path tells rsync to expect nfs2 to exist already, and will not create that directory.
If you remove that trailing "/", the directory nfs2 will be created.
rsync probably failed when it filled the transfer buffer to the max limit without being able to empty by writing to disk on the remote.