Rsync
從 Linux ext4 複製到 FreeBSD ZFS(通過 SSH)時,rsync 失敗/掛起
當我嘗試將目錄從 Linux 上的 ext4 複製到 FreeBSD 上的 ZFS 時(通過 SSH),
rsync
立即失敗,沒有複製任何內容:# rsync -haxHAX /mnt/source/ root@lethe:/mnt/dest/ -vvv opening connection using: ssh -l root lethe rsync --server -vvvlHogDtpAXrxe.iLs . /mnt/dest/ (9 args) sending incremental file list […] server_recv(2) starting pid=83765 rsync: connection unexpectedly closed (38 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.0] [sender] _exit_cleanup(code=12, file=io.c, line=226): about to call exit(12)
當我嘗試複製單個文件時,
rsync
“卡住”並無限期掛起,也沒有複製任何內容:# rsync -haxHAX /mnt/source/test.txt root@lethe:/mnt/dest/test.txt -vvv opening connection using: ssh -l root lethe rsync --server -vvvlHogDtpAXrxe.iLs . /mnt/dest/test.txt (9 args) sending incremental file list [sender] make_file(test.txt,*,0) send_file_list done send_files starting server_recv(2) starting pid=83944 recv_file_name(test.txt) [ hangs indefinitely ]
ext4 使用POSIX ACL(當它們通過
acl
mount 選項顯式啟用時)。ZFS 使用NFSv4 ACL(至少在 FreeBSD 上)。
正如
rsync
手冊頁所述:-A, --acls The source and destination systems must have compatible ACL entries for this option to work properly.
如果沒有該
-A
選項,則傳輸不會出現任何問題。