Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 20514 - arla (new ebuild)
Summary: arla (new ebuild)
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
Keywords: EBUILD
Depends on:
Reported: 2003-05-05 20:51 UTC by Siuchung Cheung (Clement)
Modified: 2007-09-14 13:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

Updated /etc/init.d/arlad (arlad,2.94 KB, text/plain)
2003-05-06 06:08 UTC, Siuchung Cheung (Clement)
Small typo in last update. Fixes can't restart problem for real. (arlad,2.94 KB, text/plain)
2003-05-06 23:38 UTC, Siuchung Cheung (Clement)
Still have typos. This should be the last one (hopefully) (arlad,2.93 KB, text/plain)
2003-05-06 23:41 UTC, Siuchung Cheung (Clement)

Note You need to log in before you can comment on or make changes to this bug.
Description Siuchung Cheung (Clement) 2003-05-05 20:51:47 UTC
Arla is another AFS client/server (the server part is still experimental). It's MUCH smaller 
than OpenAFS (1.3MB vs 12MB) and supports converting AFS tokens to/from kerberos 

Somehow OpenAFS just refuse to compile on my machine and I tried this one, which 
compiles perfectly. Perhaps they have cleaner code? ;-)

I have sucessfully compiled it on my machine but don't have time to make an ebuild yet. 
(probably not until a few months later) If anyone is interested in making an ebuild for this, 
I can contribute an init script. (The README claims to have one for linux but didn't 
mention where. And the only one I've found is for FreeBSD only. So I wrote my own.)

my /etc/init.d/arlad:
# Copyright 2003 Clement Siu-Chung Cheung (sccheung at umich dot edu)
# Distributed under the terms of the GNU General Public License v2
# available at


depend() {
    need net
    provide afs

checkconfig() {
    if [ ! -f ${etc_dir}/arla.conf ]; then
        eerror "/etc/arla/arla.conf is missing"
        return 1

    if [ ! -f ${etc_dir}/ThisCell ]; then
        eerror "/etc/arla/ThisCell is missing"
        return 1

    if [ ! -f ${etc_dir}/CellServDB ]; then
        eerror "/etc/arla/CellServDB is missing"
        return 1

    return 0

start() {
    checkconfig || return $?

    ebegin "Loading Arla kernel module"
    insmod ${bin_dir}/nnpfs.o
    eend 0

    sleep 1

    if [ ! -r /dev/nnpfs0 ]; then
        einfo "Creating device..."
        mknod /dev/nnpfs0 c 103 0
    chmod 600 /dev/nnpfs0

    if [ ! -e ${cache_dir} ] ; then
        einfo "Creating cache directory..."
        mkdir ${cache_dir}
        chmod 700 ${cache_dir}
        chown root ${cache_dir}

    ebegin "Starting arlad"

    start-stop-daemon --start --quiet --pidfile /var/run/ \
        --startas ${arla_dir}/libexec/arlad

    eend $? "Failed to start arlad"

    if [ ! -r /afs ] ; then
        einfo "Creating /afs..."
        mkdir /afs

    sleep 3

    ebegin "Mounting AFS"
    mount -t nnpfs /dev/nnpfs0 /afs
    eend $? "Failed to mount AFS"

stop() {
    ebegin "Unmounting AFS"
    umount /afs
    eend 0

    ebegin "Stopping arlad"
    start-stop-daemon --stop --quiet --pidfile /var/run/

    if [ -r /var/run/ ]; then
        eend $? "Failed to stop arlad with PID="`cat /var/run/ > /dev/null 2>&1`
        eerror "Can't find PID file for arlad."
        eerror "arlad probably has not been started successfully or somehow died already!"
        eend 0

    ebegin "Unoading Arla kernel module"
    rmmod nnpfs
    eend $? "Failed to unload Arla kernel module"

my /etc/arla/arla.conf:
NOTE: I added "dynroot yes" to generate /afs from CellServDB instead of actually 
querying the cells. This avoids locking up the system while waiting for response from 
every single AFS server in the world when you do an "ls /afs". (If any single AFS server is 
slow, you'll be waiting for that server forever and won't be able to get any listing from ls 
until it finally respond.) Just do an "ls /afs" in OpenAFS and you'll see what I'm talking 
about. (You might want to just hit Ctrl-C unless you really want to know how long it 
takes...)To make doing "ls /afs" with colors turned on or "ls -F /afs" or browsing AFS with 
file managers like konqueror actually feasible, you could add a DynRootDB to /etc/arla 
listing only the cells you want to see. But that way users won't be able to access any cells 
not listed there. (Might not be a good idea on a multi-user site)

# Arlad config file
# $Id:,v 1.2 2002/12/19 13:45:25 lha Exp $
# The upper limit of (arlad) vnodes (think files and directories)
# (high-water mark)
high_vnodes 30000
# The number of used vnodes we try to have
# (low-water mark)
low_vnodes 3000
# The upper limit of bytes in the cache
# (high-water mark)
high_bytes 1400M
# The number of bytes we try to use
# (low-water mark)
low_bytes 700M
# The number of credentials in arla, both unauthentic,
# and authentic (like Kerberos V4 creds)
numcreds 100
# The maximum connections arla will have to all servers
numconns 100
# The number of volumes stored in cache.
numvols 100
# Dynamic root, generates your /afs directory from CellServDB or
# DynRootDB. Useful when you don't want to use your cell's root.afs.
#dynroot [yes|true|no|false]
dynroot yes
# The sysname is possible to specify in the configuration file. Its
# overridden by the command like argument --sysname=
#sysname nbsd_16pre
# Rxkad encryption level, this sets the minimum encryption level for
# rxkad.
#rxkad-level [clear|auth|crypt]
# Fetch block size, this is the amount of the data that the
# cachemanager will fetch more then the user requested. It used since
# most new fileservers will have their peek fetch-rate larger then 64K
# that is the default fetch block size.
#fetch_block 4M
# The End.

my /etc/arla/DynRootDB:

That would only list those 2 cells in /afs. You might want to ask the user to modify this 
themselves in the ebuild.

The compiling is strict-forward. Just do the usual ./configure [your-options] and make &&
make install. Note that this ebuild should depends on kth-krb4 or heimdal if you want 
Kerberos 5. Getting it work with MIT Kerberos appears to be non-trivial and I've already 
given it up.
Comment 1 Siuchung Cheung (Clement) 2003-05-06 06:08:56 UTC
Created attachment 11557 [details]
Updated /etc/init.d/arlad

The kernel module seems to be always busy. This file makes /etc/init.d/arlad
restart actually work.
Comment 2 Siuchung Cheung (Clement) 2003-05-06 23:38:54 UTC
Created attachment 11614 [details]
Small typo in last update. Fixes can't restart problem for real.
Comment 3 Siuchung Cheung (Clement) 2003-05-06 23:41:38 UTC
Created attachment 11615 [details]
Still have typos. This should be the last one (hopefully)
Comment 4 Siuchung Cheung (Clement) 2003-06-01 06:48:47 UTC
Alright. Looks like there actually IS an rc file for linux. Just that I can't find it before. After make install, they put it in /usr/arla/etc/arla
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-09-14 13:59:57 UTC
No ebuild here, really no idea what are we supposed to with an initscript, sorry.

Closing WONTFIX.