If you have just upgraded to Ubuntu 10.04 Lucid Lynx, you may have noticed that mounting AFP volumes from Mac OS X no longer works. On the command line, you will get errors like this:

mount_afp: AFPMountURL returned error -5014, errno is 89

The problem is simple and is described in this post from 2007. The Berkeley DB file format of existing .AppleDB directories on Ubuntu has not been updated properly. The easiest fix is to just delete the old .AppleDB directory of your volume and run /etc/init.d/netatalk restart. By default, .AppleDB is in your home directory. AFP mounting will now work and a new database will be generated automatically.

While you are at it, I also recommend adding the options:usedots setting to /etc/netatalk/AppleVolumes.default. It will make the usual Mac OS X generated dot files like .DS_Store appear in their original form under Linux instead of the annoying :2eDS_Store. A simple AppleVolumes.default should look something like this:

~/    "Home"    options:usedots
Published 2.5.2010