我有一个包含使用 ZFS 本机加密进行加密的客户端数据的卷。我试图将其从 Ubuntu 服务器发送到 Debian 服务器。无法将zfs send
数据接收到加密卷中,因此目标卷是新卷。
但现在传输在一次小中断后失败,并且新容器没有显示。
收到的数据还在吗?我可以以某种方式继续此转移吗?
来源
zfs snapshot pool/bigdata@bup
zfs send pool/bigdata@bup | pv | nc -l -p 5555
目标
nc -w 10 1.2.3.4 5555 | zfs receive pool/bup201710
(其中 1.2.3.4 是源 IP 地址。)
笔记:ZoL ZFS 本机加密是不是
0.6.x
在Debian 和 Ubuntu 附带的ZFS 版本 ( ) 中可用。该功能于 2016 年在 ZoL 中实现,并且只能通过手动编译来实现。它不在任何标记版本中,但可以从master
他们的github页面。预计它将包含在 的标记版本中0.8
。看到 Ubuntu 和 Debian 远远落后于非常活跃的开发,许多人自己编译 ZFS。
答案1
我不知道是否可以使用包含的加密(我认为是),但通常您可以使用特殊标志恢复失败的发送send -t | recv -s
,如果您的池支持它(文档来自 illumos,我认为它与佐尔):
zfs send [-Penv] -t receive_resume_token
Creates a send stream which resumes an interrupted receive. The
receive_resume_token is the value of this property on the filesystem or
volume that was being received into. See the documentation for zfs
receive -s for more details.
zfs receive [-Fnsuv] [-o origin=snapshot] filesystem|volume|snapshot
zfs receive [-Fnsuv] [-d|-e] [-o origin=snapshot] filesystem
-s If the receive is interrupted, save the partially received state,
rather than deleting it. Interruption may be due to premature
termination of the stream (e.g. due to network failure or failure
of the remote system if the stream is being read over a network
connection), a checksum error in the stream, termination of the zfs
receive process, or unclean shutdown of the system.
The receive can be resumed with a stream generated by zfs send -t
token, where the token is the value of the receive_resume_token
property of the filesystem or volume which is received into.
To use this flag, the storage pool must have the extensible_dataset
feature enabled. See zpool-features(5) for details on ZFS feature
flags.
zfs receive -A filesystem|volume
Abort an interrupted zfs receive -s, deleting its saved partially
received state.
我首先会在本地(管道,无netcat
或pv
)使用一个小系统进行尝试,然后Ctrl-C
进行传输以查看其原则上是否有效。