SOLVED cannot destroy dataset, AFP sharing holds on to it

Status
Not open for further replies.

-fun-

Contributor
Joined
Oct 27, 2015
Messages
171
I have a dataset / afp share 'afptest' I wish to destroy (no children, no replication / snapshot tasks setup). I first deleted the afp share and stopped the afp service:

Code:
Apr 11 08:14:03 unger notifier: Stopping netatalk.
Apr 11 08:14:03 unger cnid_metad[53532]: shutting down on SIGTERM
Apr 11 08:14:03 unger netatalk[53529]: Netatalk AFP server exiting


Deleting the dataset from the UI didn't work so I tried from the shell without success:

Code:
[root@unger] ~# zfs destroy flospool/afptest
cannot unmount '/mnt/flospool/afptest': Device busy


Investigating this I found that the share is referenced by cnid_dbd which apparently is part of netatalk.

Code:
[root@unger] ~# fstat | grep afptest
root     cnid_dbd   67162   wd /mnt/flospool/afptest     13 drwxr-xr-x       9  r
root     cnid_dbd   67162   11 /mnt/flospool/afptest     13 drwxr-xr-x       9  r
root     cnid_dbd   67162   12 /mnt/flospool/afptest     16 -rw-r-----  10485760 rw


After restarting the afp service this is the result:

Code:
[root@unger] ~# fstat | grep afptest
root     cnid_dbd   67162   wd /mnt/flospool/afptest     13 drwxr-xr-x       9  r
root     cnid_dbd   67162   11 /mnt/flospool/afptest     13 drwxr-xr-x       9  r


I got as far as the fact that cnid_dbd gets started by cnid_metad which is also exiting when stopping afp, see above. It doesn't seem however that cnid_dbd is being stopped along with cnid_metad.

I guess working this deep into netatalk / afp sharing should not be required for 'just deleting' a share and dataset.

Can anybody please advise how this should work and what I can do to remove the share without pain (Rebooting my server being included into the list of things which cause pain.) I could try the -f parameter for zfs destroy, is this dangerous / advisable?

-flo-
 

-fun-

Contributor
Joined
Oct 27, 2015
Messages
171
Damn, after having poked this problem for a long time and finally having created the above post the problem just went away silently.

I assume the cnid_dbd just takes additional time to be able to exit after the afp sharing has been shutdown.

-flo-
 
Status
Not open for further replies.
Top