"zfs receive" processes running and unkillable

Status
Not open for further replies.

jakubjb

Dabbler
Joined
Feb 9, 2017
Messages
29
Hi
Two processes on replication destination FreeNAS (FreeNAS-9.3-STABLE-201506162331):
Code:
14397 ??  R	 30861:02.08 /sbin/zfs receive -F -d pool/replica
28326 ??  R	 12371:34.80 /sbin/zfs receive -F -d pool/replica

are not allowing me to destroy datasets:
Code:
pool/replica/DATASET
pool/replica/DATASET/SUB_DATASET

At least that's my guess, because replication of those two datasets never succeded completely and was removed from configuration (in GUI).
When I try to destroy the two mentioned above i get:
Code:
[root@zfs02] ~# zfs destroy -f -r pool/replica/DATASET/SUB_DATASET
cannot destroy 'pool/replica/DATASET/SUB_DATASET': dataset already exists

Now there's no replication configured and I can't kill those two "zfs receive" processes. They're in Running state, they neither read or write from/to disk:
Code:
  PID USERNAME	  VCSW  IVCSW   READ  WRITE  FAULT  TOTAL PERCENT COMMAND
14397 root			 0	 25	  0	  0	  0	  0   0.00% zfs
28326 root			 0	  3	  0	  0	  0	  0   0.00% zfs

Code:
  PID USERNAME	 THR PRI NICE   SIZE	RES STATE   C   TIME	WCPU COMMAND
14397 root		   1  20	0 39664K  1632K CPU11  11 514.5H 100.00% zfs
28326 root		   1  20	0 39664K  1644K CPU3	3 206.4H 100.00% zfs


Is reboot my only option? It's not an easy decision to make and needs to be agreed among clients so I'd rather avoid this.
 

Artion

Patron
Joined
Feb 12, 2016
Messages
331
Is your case similar to this? Maybe also this can help, at the end of the article.
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
Is your case similar to this? Maybe also this can help, at the end of the article.

Does that bug still open? It was open on opensolaris and comments are from four years ago.
 

Artion

Patron
Joined
Feb 12, 2016
Messages
331
I pointed the links not for the bug but for the method used to resolve an analog problem :
"Well, try exporting that changed zpool as I indicated above, then try creating new zpool with the "-f" flag."
So we will look for this clone and destroy it explicitly:
Code:
zdb -d tank | grep %					# Looking for the clone
zfs destroy clone-with-%-in-the-name	# Detroying the clone
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
I pointed the links not for the bug but for the method used to resolve an analog problem :

It is worthy trying. My question was if that still happening as that bug was four year ago. If it does, maybe a new ticket needs to be open ... OpenZFS? FreeBSD? FreeNAS? No clue :(
 

Artion

Patron
Joined
Feb 12, 2016
Messages
331
Also, what have you tried to kill the processes?
 

jakubjb

Dabbler
Joined
Feb 9, 2017
Messages
29
Hi, sorry for delay, I've been overworked recently.
I read the articles You linked and, to be honest, can not find clear connection to my situation.
Also, for my situation, any "zpool destroy" and similars are not a resolution. It's in production, there are tens of TiB of data and I can't - at the moment - migrate it to other storage.
What have I tried to kill the process? Well, "kill" obviously :smile: including "-9" signal. What's weird is that the process is in "Running" state, I've seen tons of posts where the state of "D" would be a problem.
 
Status
Not open for further replies.
Top