AFP Files and folders disappear from Volume

Status
Not open for further replies.

korrupto77

Explorer
Joined
Jan 2, 2013
Messages
50
Hi Gents,

Since some time I'm facing with an annoying issue: AFP does'nt show volume content properly, i mean there are files and folder in wrong place and if i check in ssh everything is fine.

Let's skip the main question related to the reasons why i'm using AFP .... :(

I googled a bit and only found this http://www.nicksherlock.com/2014/01/freenas-zfs-afp-filesharing-rsync-bad-idea/ which is extremely helpful.

It is reasonable figure out the issue is caused by non UTF8-MAC Charset generated by /usr/local/libexec/nas/generate_afpd_conf.py.

after modifying the generate_afpd_conf.py, I haven't seen any improvement regarding the main issue and

if I check the output of /usr/local/etc/afp.conf there are no differences.

Any Help ??? Thanks

[Global]

uam list = uams_dhx.so uams_dhx2.so uams_gss.so

afp listen = xx.xx.xx.xx

max connections = 50

mimic model = RackMac

vol dbnest = no

vol dbpath = /mnt/xxxx/xxxxxx

OUTPUT generate_afpd_conf.py:
if afp.afp_srv_bindip:

cf_contents.append("\tafp listen = %s\n" % ' '.join(afp.afp_srv_bindip))

cf_contents.append("\tmax connections = %s\n" % afp.afp_srv_connections_limit)

cf_contents.append("\tmimic model = RackMac\n")

cf_contents.append("\tvol charset = UTF8-MAC\n")

if afp.afp_srv_dbpath:

cf_contents.append("\tvol dbnest = no\n")

cf_contents.append("\tvol dbpath = %s\n" % afp.afp_srv_dbpath)

else:

cf_contents.append("\tvol dbnest = yes\n")

if afp.afp_srv_global_aux:

cf_contents.append("\t%s" % afp.afp_srv_global_aux.encode('utf8'))

cf_contents.append("\n")
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
I see this happen from time to time and I've just accepted it as AFP getting confused about where folders and files are supposed to be. Maybe due to a corrupted cache somewhere? As far as I've noticed, this hasn't lead to any actual data loss.

You can sometimes correct the issue by navigating to a few different folders to essentially purge the cache of the corrupted section, but this is not always effective. What does work is to cycle the AFP service. I have a script that uses the FreeNAS API to turn off the service and then turn it back on. Remount the share and navigation is usually quicker and error free. At least for a little while...

I don't have access to the script right now, but I can post it later today.
 

korrupto77

Explorer
Joined
Jan 2, 2013
Messages
50
I see this happen from time to time and I've just accepted it as AFP getting confused about where folders and files are supposed to be. Maybe due to a corrupted cache somewhere? As far as I've noticed, this hasn't lead to any actual data loss.

You can sometimes correct the issue by navigating to a few different folders to essentially purge the cache of the corrupted section, but this is not always effective. What does work is to cycle the AFP service. I have a script that uses the FreeNAS API to turn off the service and then turn it back on. Remount the share and navigation is usually quicker and error free. At least for a little while...

I don't have access to the script right now, but I can post it later today.

Thanks Fracai,
It make sense, i think AFP started this behavior whe I've added L2ARC...
 
Last edited:

Eniac74

Dabbler
Joined
Jan 9, 2015
Messages
41
Thanks Fracai,
It make sense, i think AFP started this behavior whe I've added L2ARC...
Unfortunately, I do not have much help to offer, but can only verify that I too have been having some oddities with Finder showings using AFP. My problems have been isolated to when I recently migrated files from one volume to another. Initially I had some examples where a FILE would have the attribute/kind FOLDER (although looking lika a file) and when I double-clicked it a folder of a very different character would open up, with its content.

So, yes, I can only verify that AFP seems to have some issues, albeit for me, only initially following a big migration of data.
 

Mlovelace

Guru
Joined
Aug 19, 2014
Messages
1,111
I would suggest only using afp for time machine volumes. OSX is defaulting to smb these days and apple stopped development of afp.
 

Eniac74

Dabbler
Joined
Jan 9, 2015
Messages
41
Yes, I am actually aware of that theoretical fact (no criticism intended). I therefore started out setting up my NAS using CIFS about a year ago, but it caused me so much trouble with idiosyncratic behaviour, e.g. changing some file and folder names to DOS style names (eight characters with a tilde, can't remember what it is called). I think I also had some more rather disturbing issues, but have evidently erased my human memory of them. I remember that Apple implemented their own twist of SMB, which I faintly recall probably caused many of my issues. So, in the world of FreeNAS, the CIFS/SMB option in combo with OSX mostly seemed like just theory to me. Unfortunately.
The AFP+mac setup has worked flawlessly, except for the recent issues following the above mentioned migration. With that said, if anybody has a better experience with CIFS+OSX, fine, but it did not work very well for me and if there was a fix, I did not find it worthwhile to put in the long hours to find it.
 

korrupto77

Explorer
Joined
Jan 2, 2013
Messages
50
I know AFP will be abbandoned by Apple soon and i m planning to migrate to SMB. Honestly since the 9.3( not sure) AFP worked fine after i ve ecountered many errors ...


Inviato dal mio iPhone utilizzando Tapatalk
 

Mlovelace

Guru
Joined
Aug 19, 2014
Messages
1,111
Yes, I am actually aware of that theoretical fact (no criticism intended). I therefore started out setting up my NAS using CIFS about a year ago, but it caused me so much trouble with idiosyncratic behaviour, e.g. changing some file and folder names to DOS style names (eight characters with a tilde, can't remember what it is called). I think I also had some more rather disturbing issues, but have evidently erased my human memory of them. I remember that Apple implemented their own twist of SMB, which I faintly recall probably caused many of my issues. So, in the world of FreeNAS, the CIFS/SMB option in combo with OSX mostly seemed like just theory to me. Unfortunately.
The AFP+mac setup has worked flawlessly, except for the recent issues following the above mentioned migration. With that said, if anybody has a better experience with CIFS+OSX, fine, but it did not work very well for me and if there was a fix, I did not find it worthwhile to put in the long hours to find it.
Well Apple made the switch back in 10.9 so AFP hasn't seen any love or security updates in a while. When you make the switch just create a window dataset, and leave the cifs service at it's defaults, there is no reason to worry about naming conventions or DOS style names in my experience.
 
Last edited:

korrupto77

Explorer
Joined
Jan 2, 2013
Messages
50
I was thinking to carry on with unix permissions, i got no other than os 10.9 ...


Inviato dal mio iPhone utilizzando Tapatalk
 

korrupto77

Explorer
Joined
Jan 2, 2013
Messages
50
Ok I finally decided to come back to 9.3 version in order to test and what i immediately noted was the reliability of the old version. The problem seems disappeared and behavior locks normal. I know is not a solution but I really noted a lot of trouble with 9.3.1 ver...

Thanks to all for the support
 

korrupto77

Explorer
Joined
Jan 2, 2013
Messages
50
Thanks mate,

I'already migrate to CIFS but in any case i'll preserve your precious script ... one more question maybe you know how to use AFP for timemachine and CIFS announced via netatalk ??

Thanks and regards
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
My understanding is that netatalk is AFP and has nothing to do with CIFS, but I think I get your intentions. Wait, did you mean bonjour?

I forget which the OS prefers, but I think if you have both services active OS X will ignore one of them.

I think the best method is to just mount your shares manually and save a bookmark so you don't have to specify the config every time. You can save passwords in the keychain as well.
 

korrupto77

Explorer
Joined
Jan 2, 2013
Messages
50
My understanding is that netatalk is AFP and has nothing to do with CIFS, but I think I get your intentions. Wait, did you mean bonjour?

I forget which the OS prefers, but I think if you have both services active OS X will ignore one of them.

I think the best method is to just mount your shares manually and save a bookmark so you don't have to specify the config every time. You can save passwords in the keychain as well.

You're right netatalk and CIFS are different philosophy ( i'm not sure if the service is announced by netatalk or bonjour on the finder ) in any case i will mount it "manually " in order mitigate any conflict with finder name. I've chosen this method because nevertheless users ( specially my wife ) are often disoriented if they cannot find the share volume on FInder ( unfortunately Apple has spoiled us in the past with AFP) .

Okdoki,
 
Status
Not open for further replies.
Top