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. 우분투와 데비안은 매우 활발한 개발에서 훨씬 뒤쳐져 있기 때문에 많은 사람들이 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

관련 정보