DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2010-06-08 09:17:17

thebeck
Member
Registered: 2009-11-30
Posts: 54

Netatalk 2.1.1

Hi fonz,

As a follow up to my Netatalk 2.0.5 post (http://dns323.kood.org/forum/viewtopic.php?id=5128), would it be possible to upgrade Netatalk to 2.1.1 in order to get AFP 3.2 support?

Netatalk 2.1.1:  http://netatalk.sourceforge.net/

Note that the 2.1.x version of Netatalk has a requirement of Berkeley DB 4.6 or higher.  In consideration, would it be possible to upgrade the Berkeley DB to, say, 5.0 since this is the most recent version?

Berkeley DB 5.0.21:  http://www.oracle.com/technology/softwa … index.html
Berkeley DB 4.6.21:  http://www.oracle.com/technology/softwa … index.html

Thank you for your help!

thebeck

Offline

 

#2 2010-06-10 15:28:18

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Offline

 

#3 2010-06-11 21:11:50

thebeck
Member
Registered: 2009-11-30
Posts: 54

Re: Netatalk 2.1.1

Thank you, fonz!  I'll work on the upgrade over the weekend and let you know how it goes.

Offline

 

#4 2010-06-15 09:11:46

mushanga
Member
Registered: 2009-06-26
Posts: 46

Re: Netatalk 2.1.1

Thanks again Fonz.
Installed and running since yesterday.
A big note for other adopters: don't forget to start the /ffp/sbin/cnid_metad daemon before afpd else your shares will be read only...

For info this version supports AFP3.2 and some more options like extended attributes.

Offline

 

#5 2010-06-18 21:32:50

thebeck
Member
Registered: 2009-11-30
Posts: 54

Re: Netatalk 2.1.1

That did the trick.  Thank you, mushanga.

By the way, is the "-cnidserver" option in afpd.conf required for the cnid_metad daemon?

See:  http://netatalk.sourceforge.net/2.1/htm … #id2273738

I am running with the -cnidserver switch because I thought that is what I had to do.  If I turn off the switch, is my cnid database going to get corrupted?  Or will I be back in read-only mode?

P.S.  There is an amazing benefit of AFP 3.2...  No more need to manually create the sparsebundle for Time Machine.  I created a new mount point, redirected Time Machine to it and started a fresh backup of my MacBook Pro.  Time Machine seamlessly created the sparsebundle.  WooHoo!  This is HUGE!

Offline

 

#6 2010-08-12 03:07:05

knightfreeze
Member
Registered: 2010-07-22
Posts: 5

Re: Netatalk 2.1.1

@mushanga: this update is great but how do you enable /ffp/sbin/cnid_metad to start automatically after the DNS reboots? Thanks.

Offline

 

#7 2010-08-13 12:45:18

knightfreeze
Member
Registered: 2010-07-22
Posts: 5

Re: Netatalk 2.1.1

knightfreeze wrote:

@mushanga: this update is great but how do you enable /ffp/sbin/cnid_metad to start automatically after the DNS reboots? Thanks.

Got it to work. Modified a script to include this.

Offline

 

#8 2010-08-14 10:08:41

mushanga
Member
Registered: 2009-06-26
Posts: 46

Re: Netatalk 2.1.1

That's exactly what I did ;-)
I've created a /ffp/start/cnid_metad startup script but it can also be included in modifying /ffp/start/afp startup script.

Offline

 

#9 2010-09-19 04:24:31

zuluwalker
Member
Registered: 2009-11-09
Posts: 27

Re: Netatalk 2.1.1

mushanga wrote:

That's exactly what I did ;-)
I've created a /ffp/start/cnid_metad startup script but it can also be included in modifying /ffp/start/afp startup script.

Can you share the steps of what you did or a sample script? It would greatly help me out if you did.

Offline

 

#10 2010-09-22 15:29:34

futbol4me
Member
Registered: 2010-09-18
Posts: 11

Re: Netatalk 2.1.1

ditto... can you share that script?

Offline

 

#11 2010-09-22 17:47:48

thebeck
Member
Registered: 2009-11-30
Posts: 54

Re: Netatalk 2.1.1

Below is a snippet of how I have my environment configured.  It works perfectly for me.

I am still running tests with Netatalk 2.1.3, but so far everything is running great!


afpd.conf

Code:

"homeCapsule" -uamlist uams_dhx.so,uams_clrtxt.so -cnidserver -setuplog "default log_info /ffp/var/run/afpd.log"

AppleVolumes.default

Code:

#~

/mnt/HD_a2/Data/Time_Capsule "Time_Capsule" options:tm

afpd.sh

Code:

#!/ffp/bin/sh

# PROVIDE:
# REQUIRE:
# BEFORE:

. /ffp/etc/ffp.subr

name="afpd"
start_cmd="afpd_start"
stop_cmd="afpd_stop"
status_cmd="afpd_status"

afpd_start()
{
    if [ -e /ffp/sbin/afpd ]; then
       /ffp/sbin/afpd -v

       export CNID_CHK=`ps -ef | grep cnid_metad | grep -v grep | grep -v start`
       if [ "${CNID_CHK}" = "" ]; then
          echo "Starting cnid_metad..."
          /ffp/sbin/cnid_metad -l log_info -f /ffp/var/run/cnid_metad.log
       else
          echo "cnid_metad Already Running"
       fi

       export AFPD_CHK=`ps -ef | grep afpd | grep -v grep | grep -v start`
       if [ "${AFPD_CHK}" = "" ]; then
          if [ -f /ffp/var/run/afpd.pid ]; then
             rm -f /ffp/var/run/afpd.pid
          fi

          echo "Starting afpd..."
          /ffp/sbin/afpd -P /ffp/var/run/afpd.pid
       else
          echo "afpd Already Running"
       fi
    else
       echo "No Binary"
    fi
}

afpd_stop()
{
    if [ -e /ffp/sbin/afpd ]; then
       /ffp/sbin/afpd -v

       export AFPD_CHK=`ps -ef | grep afpd | grep -v grep | grep -v stop`
       if [ "${AFPD_CHK}" = "" ]; then
          echo "Not Running"
       else
          echo "Stopping..."
          export AFPD_PID=`cat /ffp/var/run/afpd.pid`
          if [ "${AFPD_PID}" = "" ]; then
             echo "No PID found"
          else
             kill -15 ${AFPD_PID}
          fi
       fi
    else
       echo "No Binary"
    fi

    sleep 2

    if [ -f /ffp/var/run/afpd.pid ]; then
       rm -f /ffp/var/run/afpd.pid
    fi
}

afpd_status()
{
    if [ -e /ffp/sbin/afpd ]; then
       /ffp/sbin/afpd -v

       export AFPD_CHK=`ps -ef | grep afpd | grep -v grep | grep -v status`
       if [ "${AFPD_CHK}" = "" ]; then
          echo "Not Running"

          if [ -f /ffp/var/run/afpd.pid ]; then
             rm -f /ffp/var/run/afpd.pid
          fi
       else
          echo "Running"
       fi
    else
       echo "No Binary"
    fi
}

run_rc_command "$1"

Offline

 

#12 2010-09-23 20:58:28

futbol4me
Member
Registered: 2010-09-18
Posts: 11

Re: Netatalk 2.1.1

Becks,

Great stuff... thanks for posting.

Questions:

1) are you connecting MacBook running Leopard or Snow Leopard?  Seems to be differences in how 10.6 users connect via AFP compared to 10.5 users.  I've been pulling my hair out wondering if there is something with 10.6 that wont work with this configuration.

2) Time machine:

thebeck wrote:

P.S.  There is an amazing benefit of AFP 3.2...  No more need to manually create the sparsebundle for Time Machine.  I created a new mount point, redirected Time Machine to it and started a fresh backup of my MacBook Pro.  Time Machine seamlessly created the sparsebundle.  WooHoo!  This is HUGE!

2a) When you say created a new mount point, is this just pointing finder to the AFP share, or is this some unix code to create a new file mounting point to time machine?  If so, please share. 

2b) And, did you have to alter the TimeMachine settings to allow access to non-supported volumes?  (there is some switch for that).

2c) Finally, in your setup, does TimeMachine automatically try to resize the sparsebundle image to use up all the available space on the drive?

Thanks!  I'm only going through the trouble of installing AFP so I can get this time machine working.

Offline

 

#13 2010-09-24 09:11:50

thebeck
Member
Registered: 2009-11-30
Posts: 54

Re: Netatalk 2.1.1

1) are you connecting MacBook running Leopard or Snow Leopard?  Seems to be differences in how 10.6 users connect via AFP compared to 10.5 users.  I've been pulling my hair out wondering if there is something with 10.6 that wont work with this configuration.

All my mac's are running Snow Leopard.



2) Time machine:

2a) When you say created a new mount point, is this just pointing finder to the AFP share, or is this some unix code to create a new file mounting point to time machine?  If so, please share.

In theory, you don't have to initially mount the DNS with the new version of netatalk, but it does not hurt to mount in Finder.  In Time Machine, you should be able to select the DNS as a destination disk.  You must, however, also install avahi (from ffp) and configure the following service in order for Time Machine to find the destination disk:

Code:

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
        <name replace-wildcards="yes">homeCapsule</name>
        <service>
                <type>_afpovertcp._tcp</type>
                <port>548</port>
        </service>
</service-group>

Without avahi running with the correct service, Time Machine cannot discover the AFP server on the DNS.



2b) And, did you have to alter the TimeMachine settings to allow access to non-supported volumes?  (there is some switch for that).

In the mounted root on the DNS (ie. /mnt/HD_a2/Data/Time_Capsule), touch the following file from a telnet window:

Code:

.com.apple.timemachine.supported

In the Mac, open a Terminal and execute the following command

Code:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

2c) Finally, in your setup, does TimeMachine automatically try to resize the sparsebundle image to use up all the available space on the drive?

With netatalk 2.0.x, I manually created the sparsebundle using hdiutil and explicitly set the size to about 3 times my hard drive's size.  I am not sure how the automatic generation of the sparsebundle is working now that I am letting Time Machine create the sparebundle.  Let me know if you figure it out.

Last edited by thebeck (2010-09-24 09:12:56)

Offline

 

#14 2010-09-24 21:22:43

futbol4me
Member
Registered: 2010-09-18
Posts: 11

Re: Netatalk 2.1.1

THANK YOU!!!  Awesome stuff that guys like you and FONZ are putting out.

The logfiles really helped me crack the case.  I was originally following another posting on how to enable avahi and afp support on the DNS-323... http://www.noulakaz.net/weblog/2009/11/ … e-dns-323/

That tutorial is a great starting point... but is a bit old (netatalk 2.0, leopard).

I made a big ROOKIE mistake... I upgraded netatalk to 2.1.3 and configured the cnid-metad like I was supposed to... but forgot to upgrade from db42 to db48.  Netatalk 2.0-->db42.  Netatalk 2.1.3-->db48.

Now afpd is working flawlessly and time machine is backing up my snow leopard machine as we speak.

- For those interested in TimeMachine:  the sparsebundles automatically generated by time machine using netatalk 2.1.3 default to a maximum size of your entire partition.  if you have a large drive and want to reserve some for other things (perhaps time machine backups from other Macs), follow the thread here:

http://anitechtalk.wordpress.com/2010/0 … ne-dns323/

Happy TimeMachining!

Last edited by futbol4me (2010-09-25 04:19:38)

Offline

 

#15 2010-09-28 19:25:58

oleaaj
Member
Registered: 2010-09-24
Posts: 7

Re: Netatalk 2.1.1

Thank you all for a great forum!

I had some problem getting this set up. I got CNID db errors.

futbol4me found the problem. In the afpd.conf file the -cnidserver needs to be at the end. For me, this made the difference.

Offline

 

#16 2010-09-30 18:04:30

futbol4me
Member
Registered: 2010-09-18
Posts: 11

Re: Netatalk 2.1.1

final comment once you have this running...

afpd.log gets very big very fast... especially if you are running time machine.  so i turned off logging by changing the afpd.sh script to remove the logging function, and also modified the afpd.conf file to stop logging to the cnid_metad.log file.

Offline

 

#17 2010-10-10 05:59:47

zuluwalker
Member
Registered: 2009-11-09
Posts: 27

Re: Netatalk 2.1.1

thebeck wrote:

Below is a snippet of how I have my environment configured.  It works perfectly for me.

Much thanks! I have finally gotten my afp working great due to your scripts. Your help is much appreciated!

Offline

 

#18 2010-12-19 23:00:45

LorenzoG
Member
Registered: 2010-12-13
Posts: 6

Re: Netatalk 2.1.1

Hi

I have used this successfully for time machine, DNS 323 and Mac OSX 10.6.5. See this posting
http://dns323.kood.org/forum/viewtopic. … 899#p39899

My thanks to all, just brilliant

Lorenzo

Offline

 

#19 2011-01-01 06:31:01

mikeetastic
New member
Registered: 2011-01-01
Posts: 4

Re: Netatalk 2.1.1

futbol4me wrote:

THANK YOU!!!  Awesome stuff that guys like you and FONZ are putting out.

The logfiles really helped me crack the case.  I was originally following another posting on how to enable avahi and afp support on the DNS-323... http://www.noulakaz.net/weblog/2009/11/ … e-dns-323/

That tutorial is a great starting point... but is a bit old (netatalk 2.0, leopard).

sorry for the very noob question but how do i make the .service (eg http/smb.service) and the startup script (eg avahi.sh)??? been reading this tutorial for a few hours already and quite clueless..

i have setup/downloaded all the files already and i can ssh via mac Terminal or telnet (disabled it) and running latest transmission and fun plug..

5) Use the “vipw” command and change some details for the default “nobody” user so that Mac OS X can use that user to log in.

nobody:x:501:501:Linux User,,,:/home/nobody:/ffp/bin/bash

also clueless on this one too sad

Thanks all in advance and Happy New Year - hopefully someone can walk me through in making TM work.

Offline

 

#20 2011-01-21 11:03:05

mikeetastic
New member
Registered: 2011-01-01
Posts: 4

Re: Netatalk 2.1.1

^^ no love for noobs e tongue

anyways i think i manage to install everything (not sure) with the help of futbol4me link.... Thanks.

now how would i check if everything is working? i manage to do Time Machine backup with no problems and i can see my DNS-323 under share (with a different icon now) and can connect to afp://xxx.xxx....

and how can i fix this below?

http://img121.imageshack.us/img121/3984/screenshot20110121at124.png

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB