SOLVED kill active replication task

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
Here is the quick of it:
- I have one FreeNAS box replicating to another box that is on a remote site over SSH.
- I left some data on the main FreeNAS box that I didn't want replicated (because it is so large and would take forever) and So I had meant to take it out (or temporarily disable the snapshot) both of which I forgot to do.

Question:
- How do I kill the current running replication task. I don't care about keeping the snapshot that is currently replicating.

What I have already tried:
- Disabling the replication task
- Deleting the related snapshot (wouldn't allow me, said "dataset is busy" which makes sense).

Thanks!
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
I ended up doing the following:

disabled the replication task, restarted the server (this interrupted the replication), deleted the relevant snapshot, reenabled the replication task.

I asked the above question to see if there was a method of accomplishing this without restarting the server.

Thanks.
 

Superman

Dabbler
Joined
Mar 29, 2017
Messages
14
I also want to know the answer. Why is this marked as solved? Is there no solution other than restarting the server?
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
Well I marked it as solved because I followed the steps above and it achieved what I wanted.

There might be a command you can run to kill the replication task but FreeNAS hates you going behind the GUI's back so I elected the tried and true method, pull the power!

I had no problems resuming the replication tasks after I turned the replication tasks back on.
 

JustinOtherBobo

Dabbler
Joined
Aug 21, 2018
Messages
26
This (necro)thread came up on a google search while I was trying to solve the same issue earlier today.
While the disable, restart, enable routine will probably work, re-booting the server was what I was trying to avoid!

So, the snapshot cannot be deleted because it is open and in in use by the sending process (11.1-U6.3).
But, if the sending process is forcibly terminated, then the snapshot can be deleted from the GUI.

Code:
ps -A | grep zfs
kill -9 <PID>
 

steve.long

Dabbler
Joined
Jun 14, 2016
Messages
41
Code:
ps -A | grep zfs
kill -9 <PID>

[/QUOTE]

I know I'm super late to the party, but I've trying to run this command and I'm getting an error "Missing name for redirect." So I'm obviously doing something wrong, but there is not much for detail in the error or online when I search the error. Thanks in advance.
 

Adrian

Contributor
Joined
Jun 29, 2011
Messages
166
<PID> here is the process number in the second column of the ps output.
Here I have a couple of SSH Rsync tasks running.
If I wanted to stop the backup transfer, I would kill process 24116 with kill 24116
Code:
[root@freenasxl ~]# ps -aux | grep rsync
root       24116  11.1  0.1  36488  32400  -  S    18:09     10:28.49 /usr/local/bin/rsync -a -z --delay-updates --delete-delay -r -t --bwlimit=2M -e ssh -p 22 -o BatchMode=yes -o StrictHostKeyChecking=yes /mnt/tank/backup USER@HOST:freenasxl/backup
root       24450   4.8  0.0   9864   4668  -  S    18:28      1:54.93 /usr/local/bin/rsync -a -z --delay-updates --delete-delay -r -t --bwlimit=2M -e ssh -p 22 -o BatchMode=yes -o StrictHostKeyChecking=yes /mnt/tank/windows USER@HOST:freenasxl/windows
root       24117   1.8  0.1  51368  44920  -  S    18:09      0:50.29 ssh -p 22 -o BatchMode=yes -o StrictHostKeyChecking=yes -l 19528 prio.ch-s012.rsync.net rsync --server -logDtprze.iLsfxC --bwlimit=2048 --delete-delay --delay-updates . freenasxl/backup
root       24451   0.8  0.1  47272  42328  -  S    18:28      0:33.29 ssh -p 22 -o BatchMode=yes -o StrictHostKeyChecking=yes -l 19528 prio.ch-s012.rsync.net rsync --server -logDtprze.iLsfxC --bwlimit=2048 --delete-delay --delay-updates . freenasxl/windows
root       24115   0.0  0.0   4196   2008  -  I    18:09      0:00.01 /usr/bin/lockf -s -t 0 -k /mnt/tank/backup /usr/local/bin/rsync -a -z --delay-updates --delete-delay -r -t --bwlimit=2M -e ssh -p 22 -o BatchMode=yes -o StrictHostKeyChecking=yes /mnt/tank/backup USER@HOST:freenasxl/backup
root       24449   0.0  0.0   4196   2008  -  I    18:28      0:00.01 /usr/bin/lockf -s -t 0 -k /mnt/tank/windows /usr/local/bin/rsync -a -z --delay-updates --delete-delay -r -t --bwlimit=2M -e ssh -p 22 -o BatchMode=yes -o StrictHostKeyChecking=yes /mnt/tank/windows USER@HOST:freenasxl/windows
root       24979   0.0  0.0   6696   2676  0  S+   18:57      0:00.00 grep rsync
 

steve.long

Dabbler
Joined
Jun 14, 2016
Messages
41
Thanks Adrian! What it ended up being was the hyphen. I feel pretty dumb, but I got it working now.

I was typing

Code:
kill -47398


It's all straightened out!
 
Top