netatalk / afpd issues in Alf-F

687 views
Skip to first unread message

twistedpear

unread,
Jun 9, 2012, 12:19:44 PM6/9/12
to al...@googlegroups.com
I've been configuring the ALT-F'ed DNS-323 for use as a "Time-Machine" backup for my Mac.  I had to make a few minor modifications to get things working, thought I'd paste them here and hopefully they will make it into the next RC or release.  Basically there were 2 problems.  Firstly the CNID translation was not being performed because the daemon was not binding to the network ("Something wrong with the volume's CNID DB, using temporary CNID DB instead" error).  Secondly the default options prevented afpd from providing "lock stealing".  

1. Update default options to include "tm" option:
UI: services->network->afpd->Default Options
options:tm,upriv,usedots cnidscheme:dbd

2. Update startup daemon:
telnet/ssh into Alt-F
edit /etc/init.d/S51afpd
change: CNID_OPTS="-h 0.0.0.0 -p 4700 -l log_info"
to: CNID_OPTS="-h 0.0.0.0 -p 4700 -l log_info"

3. restart afpd
sh /etc/init.d/S51afpd restart
(or use UI)

=====
On the Mac Side:

4. view share
start Finder
press [cmd-k]
enter: afp://[<username>:<password>@]<nas name or ip>/<share>
([...] = optional)

... after this point there are loads of examples on the Internet for setting up Time Machine for Pre-Lion and Lion machines.

Joao Cardoso

unread,
Jun 9, 2012, 3:31:43 PM6/9/12
to al...@googlegroups.com


On Saturday, June 9, 2012 5:19:44 PM UTC+1, twistedpear wrote:
I've been configuring the ALT-F'ed DNS-323 for use as a "Time-Machine" backup for my Mac.  I had to make a few minor modifications to get things working, thought I'd paste them here and hopefully they will make it into the next RC or release.

Thanks. I really need feedback on netatalk as I don't have a mac for experimenting with.
 
 Basically there were 2 problems.  Firstly the CNID translation was not being performed because the daemon was not binding to the network ("Something wrong with the volume's CNID DB, using temporary CNID DB instead" error).  Secondly the default options prevented afpd from providing "lock stealing".  

1. Update default options to include "tm" option:
UI: services->network->afpd->Default Options
options:tm,upriv,usedots cnidscheme:dbd
 
Is the  'cnidscheme:dbd' really necessary? AppleVolumes.default says that 'dbd' is the default.
Do you mind experimenting without it? I'm in favor of minimal settings, it simplifies life debugging a lot :-)

Have you tried creating a share and specifying 'options:tm,upriv,usedots' in the options field (leaving the default options as 'options:upriv,usedots') and using it for a TM? Do you mind trying? If it works I could put a a "TM" checkbox next to each share.

2. Update startup daemon:
telnet/ssh into Alt-F
edit /etc/init.d/S51afpd
change: CNID_OPTS="-h 0.0.0.0 -p 4700 -l log_info"
to: CNID_OPTS="-h 0.0.0.0 -p 4700 -l log_info"

You mean from
    CNID_OPTS="-l log_info"
to
    CNID_OPTS="-h 0.0.0.0 -p 4700 -l log_info"

I think to recollect something related to this... do you have in /etc/hosts a localhost entry like "127.0.0.1       localhost"?

If you do not, do you mind adding it and experimenting with   CNID_OPTS="-l log_info" alone and see if it still works?

 
3. restart afpd
sh /etc/init.d/S51afpd restart
(or use UI)

You can use 'rcafpd restart', or even 'rcafpd reload', which is faster. For all initscripts in /etc/init.d/ you can use that shortcut, 'rc<service>'
 
Thanks

=====
On the Mac Side:

4. view share
start Finder
press [cmd-k]
enter: afp://[<username>:<password>@]<nas name or ip>/<share>
([...] = optional)

twistedpear

unread,
Jun 10, 2012, 1:01:01 PM6/10/12
to al...@googlegroups.com


>Is the  'cnidscheme:dbd' really necessary? AppleVolumes.default says that 'dbd' is the default.
>Do you mind experimenting without it? I'm in favor of minimal settings, it simplifies life debugging a lot :-)

No it is not strictly necessary, I was just being over cautious.

>Have you tried creating a share and specifying 'options:tm,upriv,usedots' in the options field (leaving the default options as 'options:upriv,usedots') and using it for a TM? Do you mind trying? If it works I could put a a "TM" checkbox next to each share.

Actually this is precisely how I did do it. (with the addition of a allow: entry to restrict the user)

>You mean from
>    CNID_OPTS="-l log_info"
>to
>    CNID_OPTS="-h 0.0.0.0 -p 4700 -l log_info"

Oops :-)

>I think to recollect something related to this... do you have in /etc/hosts a localhost entry like "127.0.0.1       localhost"?
>If you do not, do you mind adding it and experimenting with   CNID_OPTS="-l log_info" alone and see if it still works?

Yes, I am missing the localhost entry, though doesn't the resolver handle this itself these days ?  Anyway, having the hosts entry does resolve the issue.
Reply all
Reply to author
Forward
0 new messages