[PLUGIN] netatalk - AFP for UNRAID (Support Topic)


Rysz

Recommended Posts

netatalk - AFP for UNRAID (6.10+)

A plugin that integrates the legacy AFP file sharing protocol into newer UNRAID versions.

 

The Apple Filing Protocol (AFP), formerly AppleTalk Filing Protocol, is a proprietary network protocol, and part of the Apple File Service (AFS), that offers file services for macOS, classic Mac OS, and Apple IIs. In OS X 10.8 Mountain Lion and earlier, AFP was the primary protocol for file services. Netatalk is a freely-available Open Source AFP fileserver, this plugin provides an integration of such a server into UNRAID.

 

AFP was earlier removed from UNRAID - it is no longer being developed by Apple and is considered fussy and deprecated, however some people with outdated computers might have no other means to access their fileserver, while others might even prefer it over NFS or SMB for other reasons. This plugin for UNRAID was developed to let any such users finally update their outdated UNRAID servers without losing their beloved AFP file-serving capabilities or it might possibly draw back some users to UNRAID who couldn't live without AFP and switched elsewhere.

 

For obvious reasons this plugin is still considered EXPERIMENTAL and is not officially endorsed by LimeTech.

Please do report any issues or feedback you have in this topic, it'll help with the development of the plugin!

 

How to install?

https://raw.githubusercontent.com/desertwitch/nAFP-unRAID/main/plugin/nafp.plg

(via UNRAID Web GUI: Plugins Install Plugin Enter URL Install)

... and hopefully coming soon to Community Applications. 🙂

 

How does it work?

After installation AFP is disabled by default and waiting for your configuration.

All necessary steps to configure and use the plugin are explained in the GUI (Settings AFP).

 

How to contribute?

https://github.com/desertwitch/nAFP-unRAID

... and of most importantly - please do test and report back here!

 

Why do you have to revive this godforsaken protocol, just let it rest at last?!

I, too, have a few old Apple devices that can only speak AFP... unfortunately! 🤪

 

 

 

Edited by Rysz
  • Like 1
Link to comment

Hey There!

This is a (in theory) godsend for some stuff I'm working on!

That said, when I launch the plugin and configure the share per instructions, and restart the array, I run into issues on the client side. This is both in OS 9 and OS 10.0. 

Specifically, it asks which volumes I want to mount, and provides no options. My afp.conf file looks like as follows (share name is DerperThought).

 

Quote

; START OF DO NOT CHANGE SECTION

[Global]
log level = default:warn
zeroconf = no
vol preset = doNotChange
vol dbpath = /mnt/user/system/nafp

[doNotChange]
cnid scheme = dbd
cnid dev = no
search db = no
unix priv = yes
umask = 000
file perm = 666
directory perm = 777

; END OF DO NOT CHANGE SECTION

; START OF DEFINE USER SHARES HERE SECTION

; [share]
; path = /mnt/user/DerperThought
; time machine = no

; END OF DEFINE USER SHARES HERE SECTION



 

Link to comment
9 hours ago, symptomatic-beating8996 said:

Hey There!

This is a (in theory) godsend for some stuff I'm working on!

That said, when I launch the plugin and configure the share per instructions, and restart the array, I run into issues on the client side. This is both in OS 9 and OS 10.0. 

Specifically, it asks which volumes I want to mount, and provides no options. My afp.conf file looks like as follows (share name is DerperThought).

 



 

 

Hey - thanks for testing and writing here! 🙂

You need to remove the ; and space at the beginning of the line, that's only for commenting in the configuration files.

 

So for your share to become enabled the share section needs to look like this:

; START OF DEFINE USER SHARES HERE SECTION

[share]
path = /mnt/user/DerperThought
time machine = no

; END OF DEFINE USER SHARES HERE SECTION

The above example would create a share called share linking to /mnt/user/DerperThought

 

You could also (probably easier) name the share DerperThought too, then it'd look like this:

; START OF DEFINE USER SHARES HERE SECTION

[DerperThought]
path = /mnt/user/DerperThought
time machine = no

; END OF DEFINE USER SHARES HERE SECTION

 

Please let me know if it works now, you'll need to restart AFP or better your array for the changes to become active.

 

Edited by Rysz
Link to comment
  • 4 weeks later...

Hi!

 

Love this plugin, since the timemachine support for SMB is not really great, depending on how old/new your MacBook is. 

 

I'm getting a lot of these in my syslog. 

facility: 	daemon
appname: 	afpd
level: 		error

 

ad_header_read_ea("/mnt/user/timemachine-schibsted/{hostname}.sparsebundle/."): invalid metadata EA this is now being treated as a fatal error. if you see this log entry, please file a bug ticket with your upstream vendor and attach the generated core file.

 

They don't seem to intervene with the functionality when running TM-backups, but they sure are annoying as they're level: ERROR and I sometimes get hundreds of them. Ideas?

This github issue is potentially provides some clarity on the subject. Invalid metadata EA errors #236

 

Tl;dr

There is one suggestion HERE

Quote

Site note: One potential workaround is to disable the ad to ea on-the-fly conversion in netatalk3. The afp.conf option is:

convert appledouble = no

This option worked perfectly for me, I was having issues with my time machine share. Thank you!

 

 

I have yet to try this suggestion myself, but will update in this thread as I learn more. 

Link to comment
16 minutes ago, FredrikJL said:

Hi!

 

Love this plugin, since the timemachine support for SMB is not really great, depending on how old/new your MacBook is. 

 

I'm getting a lot of these in my syslog. 

facility: 	daemon
appname: 	afpd
level: 		error

 

ad_header_read_ea("/mnt/user/timemachine-schibsted/{hostname}.sparsebundle/."): invalid metadata EA this is now being treated as a fatal error. if you see this log entry, please file a bug ticket with your upstream vendor and attach the generated core file.

 

They don't seem to intervene with the functionality when running TM-backups, but they sure are annoying as they're level: ERROR and I sometimes get hundreds of them. Ideas?

This github issue is potentially provides some clarity on the subject. Invalid metadata EA errors #236

 

Tl;dr

There is one suggestion HERE

 

I have yet to try this suggestion myself, but will update in this thread as I learn more. 

 

And a quick update on this. Setting the parameter as suggested solved the problem above. 

[sharename]
 path = /mnt/user/path
 time machine = yes
 valid users = username
 
 # THIS IS THE THING!
 convert appledouble = no

 

Edited by FredrikJL
  • Thanks 1
Link to comment
55 minutes ago, FredrikJL said:

 

And a quick update on this. Setting the parameter as suggested solved the problem above. 

[sharename]
 path = /mnt/user/path
 time machine = yes
 valid users = username
 
 # THIS IS THE THING!
 convert appledouble = no

 

 

Thanks for the information, this is useful and interesting.

I'll see if it's worth including in the default configuration and if so if there could be negative consequences.

Link to comment
On 9/29/2023 at 12:20 PM, FredrikJL said:

Problem seems to be now that it solves the issue for my older (2016) Macbook, but the problem seems to persist for the new M1 MacBook, for some reason. I'll keep track of it for a bit and tinker a bit more as well.

 

I've just compiled a new package and updated the plugin to use that, which includes the latest netatalk version (3.1.17) where this issue should be fixed regardless of the "convert appledouble" workaround (I suggest attemping to remove that workaround from the configuration now).

 

Please update and let me know if the problem is now resolved for you either with or without the workaround.

 

Edited by Rysz
  • Thanks 1
Link to comment
On 10/1/2023 at 11:41 AM, Rysz said:

 

I've just compiled a new package and updated the plugin to use that, which includes the latest netatalk version (3.1.17) where this issue should be fixed regardless of the "convert appledouble" workaround (I suggest attemping to remove that workaround from the configuration now).

 

Please update and let me know if the problem is now resolved for you either with or without the workaround.

 

Checking in on this one again. The problem seems to be gone now and haven't appeared for more than a week.  Thanks for the update!

  • Like 1
Link to comment
  • 2 months later...
  • 3 months later...
Just now, QuestForTori said:

Has anyone successfully gotten this working with classic (Pre-OS X) versions of MacOS? I'm trying to get the share to appear on System 7.5.3 but the shares don't appear in Chooser.

 

Can you post a screenshot of your configuration?

Link to comment
5 minutes ago, QuestForTori said:

Sure, thank you for the help! When looking in the Chooser, I don't see any servers appear.
image.png.b86725d554d7b334a866ca54507c36ab.png

 

Configuration looks good, I read up a bit on this just now and it looks like there's two versions of the netatalk backend v2 and v3 which offer different compatibility with older OSes. We're currently using the newer v3 which your OS might be too old for. I'll code in a backend switch setting so you can switch between v2 and v3 backends within the plugin in the future, so hopefully that'll work for your OS as well then. I hope to have the update ready this weekend.

Link to comment
Posted (edited)

After compiling the package and running some further tests, it's unfortunately not possible to integrate the older backend. The netatalk v2 backend, and in particular the AppleTalk protocol which your OS might theoretically require to communicate, both depend on a legacy kernel module that's not or no longer present in Unraid. Sorry I couldn't be of more help there. 😞 

 

But it does list Mac OS 7.5. as compatible for the newer v3 backend as well, so perhaps just not the automatic service (server) discovery. Is there any option you can connect directly via IP in the "Chooser"? Also check out this guide for your OS version: https://forum.vcfed.org/index.php?threads/accessing-os-x-shares-from-system-7-5-3.5886/ which seems to include the necessary client software for the newer v3 protocol to connect over IP.

 

https://www.macintoshrepository.org/44248-open-transport-1-1-2

 

Please let me know if that worked for you!

 

Edited by Rysz
Link to comment
  • 3 weeks later...

I try to set up AFP on an unraid 6.12.8

When I try to save the AFP configuration file I keep getting the message "Configuration Error: /usr/local/emhttp There was an error saving the configuration file."

Thanks for your support.

Link to comment
1 hour ago, iso2024 said:

I try to set up AFP on an unraid 6.12.8

When I try to save the AFP configuration file I keep getting the message "Configuration Error: /usr/local/emhttp There was an error saving the configuration file."

Thanks for your support.

 

Hello, you need to click into this field to pick the configuration file to edit first:

grafik.png.6cde49b71708e1b1f2a4bb33eab699f0.png

 

grafik.png.3467370cc368958d06fef7f3422bd7ec.png

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.