[6.5.0] Unable to mount AFP shares


1 post in this topic Last Reply

Recommended Posts

Description:

 

AFP shares fail to mount under OS X.

 

How to reproduce:

 

  1. Create a user share and make available under AFP.
  2. Attempt to connect to the share via AFP.

 

Expected results:

 

Share is successfully mount.

 

Actual results:

 

Share fails to mount. Finder shows "Connection Failed". Error logs from UnRAID cnid_dbd.

 

Other information:

 

I did some investigation and it looks like the cause is that cnid_dbd is failing with No such device (ENODEV) errors:

Apr 21 19:13:29 UnRAID cnid_metad[19156]: Multiple attempts to start CNID db daemon for "/mnt/user/testafp" failed, wiping the slate clean...
Apr 21 19:13:29 UnRAID cnid_dbd[19156]: error opening DB environment after recovery: No such device
Apr 21 19:13:29 UnRAID cnid_dbd[19156]: Failed to open CNID database for volume "testafp"
Apr 21 19:13:29 UnRAID cnid_dbd[19156]: Recreated CNID BerkeleyDB databases of volume "testafp"
Apr 21 19:13:29 UnRAID cnid_dbd[19156]: error opening DB environment after recovery: No such device
Apr 21 19:13:29 UnRAID cnid_dbd[19156]: open_db() failed: No such device
Apr 21 19:13:29 UnRAID cnid_dbd[19156]: reinit_db() failed: No such device
Apr 21 19:13:29 UnRAID afpd[19134]: read: Connection reset by peer
Apr 21 19:13:30 UnRAID cnid_dbd[19158]: error opening DB environment after recovery: No such device
Apr 21 19:13:30 UnRAID cnid_dbd[19158]: Failed to open CNID database for volume "testafp"
Apr 21 19:13:30 UnRAID cnid_dbd[19158]: Recreated CNID BerkeleyDB databases of volume "testafp"
Apr 21 19:13:31 UnRAID cnid_dbd[19158]: error opening DB environment after recovery: No such device
Apr 21 19:13:31 UnRAID cnid_dbd[19158]: open_db() failed: No such device
Apr 21 19:13:31 UnRAID cnid_dbd[19158]: reinit_db() failed: No such device
Apr 21 19:13:31 UnRAID afpd[19134]: read: Connection reset by peer
Apr 21 19:13:32 UnRAID afpd[19134]: read: Connection reset by peer
Apr 21 19:13:33 UnRAID afpd[19134]: read: Connection reset by peer
Apr 21 19:13:34 UnRAID afpd[19134]: read: Connection reset by peer
Apr 21 19:13:35 UnRAID afpd[19134]: read: Connection reset by peer
Apr 21 19:13:36 UnRAID afpd[19134]: read: Connection reset by peer
Apr 21 19:13:36 UnRAID afpd[19134]: transmit: Request to dbd daemon (volume testafp) timed out.
Apr 21 19:13:36 UnRAID afpd[19134]: afp_openvol(/mnt/user/testafp): Fatal error: Unable to get stamp value from CNID backend
Apr 21 19:13:37 UnRAID afpd[19134]: dsi_stream_read: len:0, unexpected EOF

Further investigation into the /mnt/user/testafp/.AppleDB/db_errlog suggests that mmap appears to be returning that error:

root@UnRAID:/mnt/user/testafp/.AppleDB# tail db_errlog
mmap: No such device
mmap: No such device
mmap: No such device
Finding last valid log LSN: file: 1 offset 28
mmap: No such device
mmap: No such device
mmap: No such device
Finding last valid log LSN: file: 1 offset 28
mmap: No such device
mmap: No such device

The man page for mmap claims that a return code of ENODEV means that the underlying filesystem does not support memory mapping. /mnt/user appears to be mounted on the fuse.shfs filesystem which I do not have the source code to verify whether it supports mapping files into memory.

 

tl;dr I believe shfs does not support memory mapping causing cnid_dbd to fail which causes AFP to unable to mount the share.

 

Attached is the diagnostics file.

unraid-diagnostics-20180421-1921.zip

Link to post

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.