Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am having trouble with my netatalk server 3.0.1 on FreeBSD-9.1 RELEASE. Netatalk was installed from the ports collection and is sharing some directories over the network.

Update also netatalk version 3.0.2 has the same problems on my machine

afpd.conf

[Global]
; Global server settings

[Homes]
basedir regex = /home
home name = $f - $u 's Home

[testvolume]
path = /var/tmp

[Storage]
path = /tank

[Time Machine Backup]
path=/tank/TM_backup
vol size limit = 2000000
time machine = yes

/tank is in my case the root of a ZFS Pool with the different filesystems underneath it. I connected a mac running Mac OS X 10.7.5 to it and it works perfectly as a Time Machine device. However if I want to use the storage share to create a new aperture library on it Aperture just stalls and cannot create a new library on the server. Looking at the server log it outputs the following:

server log

Feb 17 20:09:09 glacier afpd[3501]: afp_disconnect: primary reconnect failed
Feb 17 20:09:09 glacier afpd[3210]: Terminated disconnected child[3229], client rebooted.
Feb 17 20:09:09 glacier afpd[3505]: AFP3.3 Login by towe
Feb 17 20:09:09 glacier kernel: pid 3501 (afpd), uid 501: exited on signal 6
Feb 17 20:09:09 glacier afpd[3505]: afp_disconnect: trying primary reconnect
Feb 17 20:09:09 glacier afpd[3210]: Reconnect: transfering session to child[3501]
Feb 17 20:09:09 glacier afpd[3210]: read: Bad file descriptor
Feb 17 20:09:09 glacier afpd[3210]: Reconnect: error sending DSI id to child[3501]
Feb 17 20:09:14 glacier afpd[3505]: afp_disconnect: primary reconnect failed
Feb 17 20:09:14 glacier afpd[3210]: Terminated disconnected child[3229], client rebooted.
Feb 17 20:09:14 glacier kernel: pid 3505 (afpd), uid 501: exited on signal 6
Feb 17 20:09:14 glacier afpd[3506]: AFP3.3 Login by towe
Feb 17 20:09:14 glacier afpd[3506]: afp_disconnect: trying primary reconnect
Feb 17 20:09:14 glacier afpd[3210]: Reconnect: transfering session to child[3505]
Feb 17 20:09:14 glacier afpd[3210]: read: Bad file descriptor
Feb 17 20:09:14 glacier afpd[3210]: Reconnect: error sending DSI id to child[3505]

So the server is stuck in a 5 second repeating reconnection loop which always fails.

This is the output of the zfs list command:

NAME                                    USED  AVAIL  REFER  MOUNTPOINT
tank                                    725G  4.62T   682K  /tank
tank/Downloads                         1.61G  4.62T  1.61G  /tank/Downloads
tank/TM_backup                          495G  4.62T   495G  /tank/TM_backup
tank/movies                             169G  4.62T   169G  /tank/movies
tank/music                             26.4G  4.62T  26.4G  /tank/music
tank/pictures                          24.3G  4.62T  24.3G  /tank/pictures

My questions

  1. How can I fix this reconnection loop?
  2. How can I prevent a mounted AFP share from being unmounted after some time of inactivity?

UPDATE What I now found out is that the problem arises only if I write to a RAIDZ filesystem. A plain ZFS volume works.

share|improve this question

1 Answer 1

I'm not sure if you're experiencing the same issue, but I had a very similar problem in the recent past (FreeBSD 8 + ZFS + Netatalk). Clients were disconnecting and timing out when reading files on the volume.

For me the fix was recompiling the netatalk port and disabling the SENDFILE option in the netatalk port. If you have the SENDFILE option enabled, might be worth a shot.

share|improve this answer
    
I have the sendfile enabled because I thought it would improve performance, not diminish reliability. –  GorillaPatch Feb 21 '13 at 19:12
    
Also without sendfile support it does now work. –  GorillaPatch Feb 21 '13 at 20:23
    
So that fixed the problem? –  Raolin Feb 22 '13 at 16:49
    
No sorry, a typo in a critical word. it does NOT work. –  GorillaPatch Feb 22 '13 at 17:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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