I'm using PV for my ZFS send-recv replication. I use ZFS resume token too but i want to pause and resume like sigstop, sigcontinue. Because using resume token means sending same thing again. So how do you manage pause and resume with pv?

BTW: "pv - monitor the progress of data through a pipe"

  • ctrl+z assuming your zfs send | pv | zfs receive is run from an interactive shell, would send the SIGTSTP to the whole process group so to all 3 processes – Stéphane Chazelas Dec 18 '17 at 22:25
  • 2
    Or you could SIGSTOP pv only, then zfs receive will stop receiving any input, and zfs send will get blocked when the pipe to pv is full. And everything will resume when pv is resumed. SIGSTOPping the other processes would work as well. – Stéphane Chazelas Dec 18 '17 at 22:28

Using "sigstop - sigcont" signal on ZFS send or receive process cause error. Only way to using these signals works with when you use "PV". You can stop and cont PV but when you stop PV zfs still trying to send and I don't know yet consequences or is it cause any problem or CPU, I/O usage on host. I stoped few hours and send sigcont I did not saw any problem.

  • If you made it a few hours without any error, that's a good indication that sending SIGSTOP to pv will work for longer periods. What should happen is the zfs send ... process hangs trying to write more data to the pipe to the pv process. Since zfs send is designed to send data across things like network connections, it should be robust enough to handle long periods of being blocked. In my experience, "long" timeouts in software are measured in seconds or maybe minutes. I don't think I've ever encountered anything with timeouts measured in hours or days. – Andrew Henle Jan 6 '18 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.