Netatalk 2.2 for FreeNAS 8.0.1 Beta 4 - Lion AFP & Time Machine

Status
Not open for further replies.

pauldonovan

Explorer
Joined
May 31, 2011
Messages
76
Regarding curly brace things in aidsk.service, is this correct?

* mac-address: gotten from 'ifconfig | grep ether' (this is the easy part)
* freenas-name: the machine's hostname as "myfreenas" or "myfreenas.local"?
* generate-a-uuid: any random string, or what?

I believe freenas-name should actually be timemachine-sharename - the name you gave the share when setting it up. Mine is Timemachine. I had that part of the avahi registering working a while ago using these instructions, which confirms it's the share name:

http://www.bootc.net/archives/2010/11/07/apple-time-machine-and-netatalk/

But it doesn't really matter initially. That part is only so that the Mac can find the backup automatically and suggest it in the "Choose Backup Disk" window. Well, it will matter if you have a system crash and need to restore from a backup - your time machine backup would be found automatically. I need to play with this as, as I said, I did have that working at one point.
Paul
 

wizpig64

Dabbler
Joined
Aug 3, 2011
Messages
11
I believe freenas-name should actually be timemachine-sharename - the name you gave the share when setting it up. Mine is Timemachine. I had that part of the avahi registering working a while ago using these instructions, which confirms it's the share name:

http://www.bootc.net/archives/2010/11/07/apple-time-machine-and-netatalk/

But it doesn't really matter initially. That part is only so that the Mac can find the backup automatically and suggest it in the "Choose Backup Disk" window. Well, it will matter if you have a system crash and need to restore from a backup - your time machine backup would be found automatically. I need to play with this as, as I said, I did have that working at one point.
Paul

Changed the freenas-name to "DeLorean", my TM volume. Still will not back up :(

I'm upgrading the time machine volume from my old OS X 10.6 installation's backup. Do you think the new uuid might break it from converting?
 

Alexgdb

Dabbler
Joined
Aug 3, 2011
Messages
34
Sorry to be a noob here, but how exactly do I

Edit the adisk.service file in avahi-services. Replace the bits with curly brackets with your installation information?

I have SSH'd in on my mac using terminal, and done every step upto here.
 

wizpig64

Dabbler
Joined
Aug 3, 2011
Messages
11
Sorry to be a noob here, but how exactly do I

Edit the adisk.service file in avahi-services. Replace the bits with curly brackets with your installation information?

I have SSH'd in on my mac using terminal, and done every step upto here.

I used nano to edit the file, like this:

Code:
nano adisk.service


or "nano avahi-services/adisk.service" if you're in the netatalk folder, or whatever applies.

vi also comes with freenas it seems, but nano is the more noob-friendly editor. press ctrl+x to exit when you're done with the changes, and it will prompt you to save.
 

Alexgdb

Dabbler
Joined
Aug 3, 2011
Messages
34
I'm getting a Permission Denied error when starting them up again. Is there a command I can use to set them correctly?

Actually, it's saying:

freenas avahi-daemon[2352]: open("/usr/local/etc/avahi/services/adisk.service", 0_RDONLY): Permission denied

freenas avahi-daemon[2352]: Failed to load service group file /usr.local/etc/avahi/services/adisk.service, ignoring.


Also, when I try and start netatalk, I get this error:

Will not 'start' netatalk because netatalk_enable is NO.
 

wizpig64

Dabbler
Joined
Aug 3, 2011
Messages
11
is /usr/local/etc/avahi/services/adisk.service open in an editor somewhere, maybe in another session/tab? that's all I can think of. try closing all your sessions and copy the file over again.

(just another noob here)
 

Alexgdb

Dabbler
Joined
Aug 3, 2011
Messages
34
Maybe so, but you're doing better than me!

Right, I've narrowed it down to that if I try to start either netatalk or avahi, I get the error

Will not 'start' avahi_daemon because avahi_daemon_enable is NO.

or

Will not 'start' netatalk because netatalk_enable is NO.


UPDATE:

I edited /var/tmp/rc.conf.freenas and set both _enable to YES. Both services have started now, but my permissions are still off and the AFP switch on the webGUI won't turn on. When I do, the console still tells me the permissions are wrong.
 

Alexgdb

Dabbler
Joined
Aug 3, 2011
Messages
34
Yeah, I access the server by

ssh root@192.168.0.130 and use the password 'frenas'

I'm going to do a fresh install tomorrow hopefully, and that should give me a fresh start. Thanks for your suggestions though.
 

wizpig64

Dabbler
Joined
Aug 3, 2011
Messages
11
really don't know what to say though. a fresh install could do it, but you should change that root password to something other than the default, even if the machine is on a closed network.
 

tungsten2k

Cadet
Joined
Aug 3, 2011
Messages
3
EDIT: This does not take into consideration the changes in "Update 4" so you'll have to manually massage the rest - tungsten2k

Yeah, you probably need to start fresh. After that, I would ensure you're extracting the tarball with permissions.

Extract the tarball you placed at /root/:
Code:
cd /root/
tar xfzp netatalk-2.2*gz
mv netatalk-2.2*gz timemachinefixes.tar.gz
cd netatalk-2.2*
That will put you in the /root/netatalk-2.2<platform> directory so you can execute the steps in the first post.

For the completely uninitiated, once you've followed the how-to enough to get the tarball for your platform extracted to the /root/netatalk-2.2<platform> directory and are currently in that directory, you can create a script with the following lines of text in it:
Code:

#!/bin/sh
/usr/local/etc/rc.d/netatalk stop
/usr/local/etc/rc.d/avahi-daemon stop
mv /usr/local/sbin/afpd /usr/local/sbin/afpd-2.1.5
mv /usr/local/sbin/atalkd /usr/local/sbin/atalkd-2.1.5
mv /usr/local/sbin/cnid_metad /usr/local/sbin/cnid_metad-2.1.5
mv /usr/local/sbin/cnid_dbd /usr/local/sbin/cnid_dbd-2.1.5
mv /usr/local/sbin/papd /usr/local/sbin/papd-2.1.5
mv /usr/local/libexec/netatalk-uams /usr/local/libexec/netatalk-uams-2.1.5
cp ./afpd /usr/local/sbin/
cp ./atalkd /usr/local/sbin/
cp ./cnid_metad /usr/local/sbin/
cp ./cnid_dbd /usr/local/sbin/
cp ./papd /usr/local/sbin/
cp -rp ./uams /usr/local/libexec/netatalk-uams
cp ./avahi-services/adisk.service /etc/local/avahi/services
cp /etc/local/avahi/services/adisk.service /conf/base/etc/local/avahi/services/
mkdir /usr/local/etc/netatalk/
/usr/local/etc/rc.d/netatalk start
/usr/local/etc/rc.d/avahi-daemon start
cp -rp /usr/local/etc/netatalk /conf/base/etc/local
if it was called "doitforme.sh" you would make it executable:
Code:
chmod +x doitforme.sh
then run it:
Code:
./doitforme.sh
 

Alexgdb

Dabbler
Joined
Aug 3, 2011
Messages
34
I have tried your steps and untarred it on the server, however when I try to run:

Code:
cp ./atalkd /usr/local/sbin/


I get the error:

Code:
cp: /atalkd: No such file or directory


I am currently in:

Code:
freenas# cd /mnt/pri/Alex/netatalk-2.2*

/mnt/pri/Alex/netatalk-2.2*: Ambiguous.
 

pauldonovan

Explorer
Joined
May 31, 2011
Messages
76
I have tried your steps and untarred it on the server, however when I try to run:

Code:
cp ./atalkd /usr/local/sbin/


I get the error:

Code:
cp: /atalkd: No such file or directory


I am currently in:

Code:
freenas# cd /mnt/pri/Alex/netatalk-2.2*

/mnt/pri/Alex/netatalk-2.2*: Ambiguous.

That * on the end of your directory name isn't good. * is used as a wildcard (matched anything) in shell commands, so that might be confusing things. I'm actually surprised you can create a directory with a * in the name.

What happens when you run
Code:
ls -l


You should see:
Code:
total 3900
-rwxr-xr-x  1 root  wheel  1793048 Aug  3 07:33 afpd
-rwxr-xr-x  1 root  wheel   348049 Aug  3 07:38 atalkd
drwxr-xr-x  2 root  wheel        3 Aug  3 07:40 avahi-services
-rwxr-xr-x  1 root  wheel   746266 Aug  3 07:34 cnid_dbd
-rwxr-xr-x  1 root  wheel   369264 Aug  3 07:34 cnid_metad
-rwxr-xr-x  1 root  wheel   432098 Aug  3 07:39 papd
drwxr-xr-x  2 root  wheel       13 Aug  3 07:40 uams


Notice the afpd file there? That's what your cp command is trying to copy (./ means "in this directory")

Paul
 

Alexgdb

Dabbler
Joined
Aug 3, 2011
Messages
34
Right, I'll try that. Thanks a lot. I've done another fresh install as to not have anything I've done before conflicting. I'll let you know.
 

Alexgdb

Dabbler
Joined
Aug 3, 2011
Messages
34
Okay, Update.

I have followed it all, but when I come to start the services again, I can start the avahi-daemon fine, but when I go to start netatalk, I get the following error:

Code:
freenas# /usr/local/etc/rc.d/netatalk start
/usr/local/sbin/cnid_metad: 6: Syntax error: word unexpected (expecting ")")
: not found
/usr/local/sbin/afpd: cannot open 
                                  : No such file or directory
ELF: not found
/usr/local/sbin/afpd: 4: Syntax error: word unexpected (expecting ")")


Also, when I try:

Code:
freenas# /usr/local/sbin/afpd -v


I just get:

Code:
/usr/local/sbin/afpd: Exec format error. Binary file not executable.
 

garth

Dabbler
Joined
Jul 21, 2011
Messages
22
Okay, Update.

I have followed it all, but when I come to start the services again, I can start the avahi-daemon fine, but when I go to start netatalk, I get the following error:

You downloaded the wrong tarball for your system. There is one for 32-bit (x86) and one for 64-bit (amd64) - download the correct one for your system based on the system type you installed FreeNAS.
 

Alexgdb

Dabbler
Joined
Aug 3, 2011
Messages
34
I am using an Athlon II, which as far as I knew was 64 bit? Am I totally wrong? So with this assumption, I used the amd64 version. I will however try it with the x86 version too.
 

Alexgdb

Dabbler
Joined
Aug 3, 2011
Messages
34
Ah, turns out the x86 one worked fine. The only problem I'm getting now is the following message being printed to the server console every time somebody logs in:

Code:
freenas  afpd[10160]: ERROR: Cannot create /usr/local/etc/netatalk/afp_signature.conf (No such file or directory). Using one-time signature. 
 
Status
Not open for further replies.
Top