- What one needs to consider when AFD runs on a NFS filesystem Remember the internal directory structure of AFD and the what happens internally when it sends a file. Make sure that the files directory (and maybe also the archive directory) is also located on the NFS mount. When you monitor directories on an NFS filesystem and you have problems that AFD does not pick up files, use the [dir options] 'force reread'. NFS sometimes does not update the date of the directory correctly. 'force reread' will force AFD to read the content of the directory every time during each scan. Otherwise it would just check the date of the directory to see if anything changes. For performance and stability reasons it is not good if fifodir is on an NFS mount. Better to use tmpfs or ram disk for the fifodir. This has the disadvantage that you will loose some statistical information after a system crash, but you will not loose any data. - Things to consider when configuring the FTP server A good and secure FTP server is vsftpd. Do not run the FTP server via xinetd, it is very slow. Also, disable logging if you do not need it. Logging is very expansive on a system that receives lots of files. Use only FTP accounts that have no shell. The password is transmitted in clear text via internet or RMDCN! chroot the FTP account so that the FTP user cannot explore your server. - Let AFD only move files and NOT copy them As mentioned earlier always let AFD run as closely as possible where the actual data is produced. Ensure that at least that the files directory is in the same filesystem where it's input directories are. Use soft links. - Some performance tweaks Compile in only that what you need. Use the configure option --enable-compiler-optimizations On linux (as of kernel 2.6.17) use --enable-splice_support. This avoids copying data from kernel space to user space when copying files locally. The copying only happens in kernel space. For network connections use --enable-sendfile_support. Again the kernel does not need to copy any data to user space for any sockets. Only tested on linux. Do NOT do the following: $AFD_WORK_DIR/etc/DIR_CONFIG [directory] ~afd/data/in [files] * [destination] [recipient] file://afd@local/data/out1 file://afd@local/data/out2 sftp://afd@local/data/out3 ftp://ftponly:secret@local/data/out4 [options] exec -d bzip2 -9 %s Rather do it as follows: $AFD_WORK_DIR/etc/DIR_CONFIG [directory] ~afd/data/in [files] *.bz2 [destination] [recipient] file://afd@local/data/in [options] exec -d bzip2 -9 %s lock OFF [files] !*.bz2 * [destination] [recipient] file://afd@local/data/out1 file://afd@local/data/out2 sftp://afd@local/data/out3 ftp://ftponly:secret@local/data/out4 Mount your filesystem with the noatime flag! Most newer linux systems have relatime set automatically. But better is noatime. - What one needs to consider in an High availability environment First thing you need to decide if you really need a cluster with a shared filesystem/disk. Arguments against it are higher complexity and single point of failure. If you decide that you need it, have a look at DRBD (http://www.drbd.org/). For cluster software have a look at heartbeat (http://www.linux-ha.org). Note, that you do not need pacemaker (keeps your applications running). If you use heartbeat or pacemaker there is a script in the AFD source package that does all the necessary checks and starts/stops AFD during a switch over. The script can be found in the directory script and is also just called afd. Since this script is also used for starting AFD when system boots, you have to rename this to afdha to activate it's HA features. In the case of heartbeat you would just need to issue the following command: cp scripts/afd /etc/ha.d/resource.d/afdha