Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:services:nas:netatalk_configuration [2018/03/03 20:56] – ↷ Links adapted because of a move operation bobafetthotmaildocs:guide-user:services:nas:netatalk_configuration [2020/08/26 18:32] – [Avahi-daemon Configuration] nwm
Line 15: Line 15:
  
   opkg update && opkg install nano shadow-groupadd shadow-groupmod shadow-useradd shadow-usermod   opkg update && opkg install nano shadow-groupadd shadow-groupmod shadow-useradd shadow-usermod
 +
 ==== Available Netatalk Features ==== ==== Available Netatalk Features ====
 Many of the Netatalk goodies such as Spotlight search, Zeroconfig, ACL and LDAP support have been disabled. That was probably a wise decision to save space and provide a broader range of hardware support. The good news Time Machine support is available. With a simple command ''afpd -V'' we can check what features have been compiled into Netatalk.  Many of the Netatalk goodies such as Spotlight search, Zeroconfig, ACL and LDAP support have been disabled. That was probably a wise decision to save space and provide a broader range of hardware support. The good news Time Machine support is available. With a simple command ''afpd -V'' we can check what features have been compiled into Netatalk. 
Line 51: Line 52:
 Server messages path: /var/netatalk/msg/ Server messages path: /var/netatalk/msg/
 </code> </code>
 +
 ==== Basic File Share Configuration (Time Machine Server) ==== ==== Basic File Share Configuration (Time Machine Server) ====
  <WRAP center round todo 90%>  <WRAP center round todo 90%>
Line 61: Line 63:
  
 The afp.conf file contains all AFP specific configurations and AFP volume definitions. Let's edit ours with ''nano /etc/afp.conf'' and setup our Time Machine Server; we'll be using the nano text editor in this tutorial. Netatalk has a lot of great features not covered in this //guide//. Make sure to checkout the documentation for more Time Machine options and other possible AFP uses. [[http://netatalk.sourceforge.net/3.0/htmldocs/afp.conf.5.html]] The afp.conf file contains all AFP specific configurations and AFP volume definitions. Let's edit ours with ''nano /etc/afp.conf'' and setup our Time Machine Server; we'll be using the nano text editor in this tutorial. Netatalk has a lot of great features not covered in this //guide//. Make sure to checkout the documentation for more Time Machine options and other possible AFP uses. [[http://netatalk.sourceforge.net/3.0/htmldocs/afp.conf.5.html]]
 +
 +log file = /var/log/afpd.log
 +For initial configuration, it's good to check the log file.
 +
 +afp interfaces = br-lan
 +In case you have multiple interfaces. Select the one, which you want to use for listening.
 +
 +vol size limit = size in MiB (V)
 +Useful for Time Machine: limits the reported volume size, thus preventing Time Machine from using the whole real disk space for backup. Example: "vol size limit = 1000" would limit the reported disk space to 1 GB. IMPORTANT: This is an approximated calculation taking into account the contents of Time Machine sparsebundle images. Therefor you MUST NOT use this volume to store other content when using this option, because it would NOT be accounted. The calculation works by reading the band size from the Info.plist XML file of the sparsebundle, reading the bands/ directory counting the number of band files, and then multiplying one with the other.
 +
 +
  
 <code> <code>
 ; ;
 ; Netatalk 3.x configuration file ; Netatalk 3.x configuration file
-;+ 
 + 
 +[Global] 
 +; Global server settings 
 +log file = /var/log/afpd.log 
 +afp interfaces = br-lan
  
 [Backups] [Backups]
-     path = /mnt/sdb1/Backups +path = /mnt/sdb1/Backups 
-     time machine = yes +time machine = yes 
-     vol size limit = 250000 +vol size limit = 250000  
-     valid users = @users+valid users = @users
 </code> </code>
 +
 +Don't forget to restart the daemon with ''/etc/init.d/afpd restart''.
 +
 ==== Avahi-daemon Configuration ==== ==== Avahi-daemon Configuration ====
 The default avahi-daemon configuration ''/etc/avahi/avahi-daemon.conf'' works perfect with stable LEDE 17.01.0+ and no chages are required. The default avahi-daemon configuration ''/etc/avahi/avahi-daemon.conf'' works perfect with stable LEDE 17.01.0+ and no chages are required.
Line 106: Line 127:
 rlimit-nproc=3 rlimit-nproc=3
 </code> </code>
 +
 +By default Avahi daemon requires running dbus. Start the dbus with command ''/etc/init.d/dbus start'' in case it's not running. Or disable it with ''enable-dbus=no''.
 +Start the Avahi daemon with command ''/etc/init.d/avahi-daemon start''.
  
 :!: Learn about other configuration options here [[https://github.com/lathiat/avahi]] :!: Learn about other configuration options here [[https://github.com/lathiat/avahi]]
 +
 ==== Zeroconf Advertising ==== ==== Zeroconf Advertising ====
 The LEDE implementation of Netatalk was not compiled with Zeroconf support; so we must advertise the required afpovertcp, device-info, and adisk text-record properties manually. We previously installed avahi-daemon (via avahi-utils) for exactly this purpose. Let's create a service file ''nano /etc/avahi/services/afp.service'' using the template below. The LEDE implementation of Netatalk was not compiled with Zeroconf support; so we must advertise the required afpovertcp, device-info, and adisk text-record properties manually. We previously installed avahi-daemon (via avahi-utils) for exactly this purpose. Let's create a service file ''nano /etc/avahi/services/afp.service'' using the template below.
Line 139: Line 164:
  
 :!: ''adVN=Backups'' should match the virtual volume name of your ''timemachine = YES'' share from ''/etc/afp.conf''. If you used my example settings above; leave this set to ''Backups''. Most online guides use //"TimeMachine"// however //"Backups"// is more traditional since it's the default when using macOS Server or Time Capsule; although it realy dosen't matter what you call it, as long as they both match. :!: ''adVN=Backups'' should match the virtual volume name of your ''timemachine = YES'' share from ''/etc/afp.conf''. If you used my example settings above; leave this set to ''Backups''. Most online guides use //"TimeMachine"// however //"Backups"// is more traditional since it's the default when using macOS Server or Time Capsule; although it realy dosen't matter what you call it, as long as they both match.
 +
 +Don't forget to restart the daemons after changing the configuration.
  
 **Some helpful links** **Some helpful links**
  
-[[https://guidgenerator.com]] +  * [[https://guidgenerator.com]] 
-[[http://www.freeformatter.com/xml-formatter.html]] +  [[https://www.freeformatter.com/xml-formatter.html]] 
-[[http://netatalk.sourceforge.net/wiki/index.php/Bonjour_record_adisk_adVF_values]]+  [[http://netatalk.sourceforge.net/wiki/index.php/Bonjour_record_adisk_adVF_values]] 
 ==== User and Group Management ==== ==== User and Group Management ====
 In this section we'll create two (2) new users on the LEDE system for file sharing purposes. Create as many or as little as you like, the principles are the same. We'll also accomplish the following: In this section we'll create two (2) new users on the LEDE system for file sharing purposes. Create as many or as little as you like, the principles are the same. We'll also accomplish the following:
Line 178: Line 206:
   root@LEDE:~# grep users /etc/group   root@LEDE:~# grep users /etc/group
   users:x:100:mrengles,anne,brian   users:x:100:mrengles,anne,brian
 +
 ==== Preserving Configuration on Firmware Upgrade ==== ==== Preserving Configuration on Firmware Upgrade ====
  
Line 205: Line 234:
  
 For more information, please check the [[docs:guide-user:installation:sysupgrade.cli|Upgrading LEDE from the Command Line]] For more information, please check the [[docs:guide-user:installation:sysupgrade.cli|Upgrading LEDE from the Command Line]]
 +
 ==== Setup Time Machine on macOS ==== ==== Setup Time Machine on macOS ====
 Settting up Time Machine on the Mac is a very simple process: Settting up Time Machine on the Mac is a very simple process:
Line 216: Line 246:
  
 ==== Final Thoughts ==== ==== Final Thoughts ====
-If you have questions, post them in the LEDE Project Forum so that myslef and others can respond. [[https://forum.lede-project.org]]+If you have questions, post them in the OpenWrt Forum so that myself and others can respond. [[https://forum.openwrt.org]]
  
 Please update this user guide if you have a better way of doing things or notice typos and errors. :-) Please update this user guide if you have a better way of doing things or notice typos and errors. :-)
  • Last modified: 2024/09/14 00:46
  • by ticomonster