[HCoop-Help] "aklog: can't get afs configuration"

Zrajm C Akfohg zrajmc at gmail.com
Sat Apr 4 22:41:34 EDT 2009


In the end I got "aklog" to work. This is how I did, If anyone should
be interested.

On Sat, Apr 4, 2009 at 6:50 PM, Adam Megacz <megacz at hcoop.net> wrote:
>
> Please try this sequence of commands:
>
> dpkg --purge openafs-client openafs-krb5
>
> echo 'openafs-client openafs-client/thiscell string hcoop.net' | debconf-set-selections
> echo 'openafs-client openafs-client/thiscell seen true' | debconf-set-selections
> echo 'openafs-client openafs-client/dynroot boolean true' | debconf-set-selections
> echo 'openafs-client openafs-client/dynroot seen true' | debconf-set-selections
> echo 'openafs-client openafs-client/cachesize string 500000' | debconf-set-selections
> echo 'openafs-client openafs-client/cachesize seen true' | debconf-set-selections
> echo 'openafs-client openafs-client/cell-info string' | debconf-set-selections
> echo 'openafs-client openafs-client/cell-info seen true' | debconf-set-selections
> echo 'openafs-client openafs-client/run-client boolean true' | debconf-set-selections
> echo 'openafs-client openafs-client/run-client seen true' | debconf-set-selections
>
> apt-get install openafs-client openafs-krb5
>
> module-assistant a-i -t openafs-modules

This command took some time to finish. (I didn't have module-assistant
installed, so I did "sudo aptitude install module-assistant" to obtain
it.)

> depmod

This one was really quick.

> /etc/init.d/module-init-tools start

What does this do? Is it always run at boot? Or do I need to see to it
that it is?

> /etc/init.d/openafs-client start

Failed with:

# sudo /etc/init.d/openafs-client start
Starting AFS services: afsd.
afsd: ERROR: Cache dir check failed (cannot use reiserfs as cache partition)

Found the following advice on http://www.debian-administration.org/articles/610.

"The cache directory must be on an Ext2 or Ext3 filesystem partition.
In case it is, you just have to ensure there's enough disk space on
the partition.

"In case it is not, in case you're using a different filesystem for
/var/ or /var/cache/, then you need to mount an Ext partition or file
onto /var/cache/openafs/. "

So I created a 600 MB loopback file using (loopback stuff gotten from
http://www.walkernews.net/2007/07/01/create-linux-loopback-file-system-on-disk-file/):

    # dd if=/dev/zero of=/ytra/openafs-cache.loopback bs=1024 count=600000
    600000+0 records in
    600000+0 records out
    614400000 bytes (614 MB) copied, 30.3648 s, 20.2 MB/s

Set it up as loopback device:

    # sudo losetup /dev/loop0 /ytra/openafs-cache.loopback

Formatted the device with ext3 file system:

    # sudo mkfs.ext3 /dev/loop0
    mke2fs 1.41.3 (12-Oct-2008)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    37520 inodes, 150000 blocks
    7500 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=155189248
    5 block groups
    32768 blocks per group, 32768 fragments per group
    7504 inodes per group
    Superblock backups stored on blocks:
            32768, 98304

    Writing inode tables: done
    Creating journal (4096 blocks): done
    Writing superblocks and filesystem accounting information: done

    This filesystem will be automatically checked every 25 mounts or
    180 days, whichever comes first.  Use tune2fs -c or -i to override.

And then mount the thingy as the openafs cache directory:

    # sudo mount /dev/loop0 /var/cache/openafs/

This worked, so I stopped openafs-client, unmounted everything and
added my loopback device to /etc/fstab so that everything would work
after a reboot.

    # sudo /etc/init.d/openafs-client stop
    # sudo umount /var/cache/openafs
    # sudo losetup -d /dev/loop0

Added to /etc/fstab:

    /ytra/openafs-cache.loopback  /var/cache/openafs ext3 loop 0 2

Now the loopback will be mounted on boot, and can be mounted with:

   # sudo mount /var/cache/openafs

And my /etc/rc.* directories seem to include openafs-client. So I'm
guessing everything will start okay (and I'm in no mood to do the
actual reboot, so that'll have to do for now).

"klist -T" ("-T, --tokens display AFS tokens" according to the
manpage) now says:

    Credentials cache: FILE:/tmp/krb5cc_1000
            Principal: zrajm at HCOOP.NET

      Issued           Expires          Principal
    Apr  5 04:38:02  Apr  5 14:38:02  krbtgt/HCOOP.NET at HCOOP.NET
    Apr  5 04:38:02  Apr  5 14:38:02  afs/hcoop.net at HCOOP.NET

    Apr  5 04:38:02  Apr  5 14:38:01  User's (AFS ID 1000) tokens for hcoop.net

/zrajm

-- 
  Zrajm C Akfohg   Mobil: 076-211 50 43   E-post: zrajm at klingonska.org
  Villav.33, 2tr   Telefon: 018-500 911   http://zrajm.klingonska.org/
  Upsala, Sweden   ICQ-nummer: 16769663   voDleH Hol DajatlhlaH'a' je?



More information about the HCoop-Help mailing list