netcatを介して失敗した(ZoL)ZFS転送を回復できますか?

netcatを介して失敗した(ZoL)ZFS転送を回復できますか?

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.xDebianとUbuntuに付属のZFSバージョンで利用可能です()。この機能は2016年にZoLに実装され、手動コンパイルでのみ可能です。タグ付きバージョンにはありませんが、masterそのバージョンにあります。旗ハブページ。のタグバージョンに含まれると予想されます0.8。 UbuntuとDebianは非常に活発な開発ではるかに遅れているため、多くの人がZFSを直接コンパイルします。

ベストアンサー1

埋め込まれた暗号化が利用可能かどうかはわかりませんが(そうだと思います)、通常send -t | recv -sプールでサポートされている場合は、特別なフラグを使用して失敗した転送を回復できます(illumosのドキュメント、zorに関連していると思います)。

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または)を試してから、送信して原則として機能していることを確認します。pvCtrl-C

おすすめ記事