[OpenAFS] OpenAFS crashes when using it on overlayfs

Karl Behler karl.behler@ipp.mpg.de
Thu, 6 Oct 2016 14:45:38 +0200


Hi,

I guess Volkmar is quite right suspecting AFS cache file system issues 
as the cause of your problem.

Sorry can't hellp with that, but another cache configuration might help.

We made good experiences to put the AFS cache on a tmpfs in swap which 
finally is held by the OS in memory.
This requires an entry in /etc/vfstab (on Linux it's /etc/fstab) looking 
like follows:

#device                         device  mount                   FS      fsck    mount   mount
#to mount                       to fsck point                   type    pass    at boot options
#
...
swap                            -       /var/afs-cache          tmpfs   -       yes     size=16384m

This kind of AFS configuration works like a disk cache (no need to 
modify your afsd startup parameters),
but provides speed like a memcache because tmpfs is managed in memory as 
long as some is available.
I should say our OS environment is Solaris 10 and 11. However, should 
work on Linuxes very similar.

Regards,

Karl

On 06.10.16 13:31, Volkmar Glauche wrote:
> Hi Michael,
>
> I don't know what is going on in detail here. Since the kernel log says
> something about AFS cache scan before the crash, there might be some
> issue with your cache partition. If your overlay covers the entire
> client filesystem, does that include AFS cache as well? Would it be
> possible to either mount a non-overlay partition for the cache (disk or
> ram)? Another workaround might be to use a memory cache instead of a
> disk cache.
>
> Best,
>
> Volkmar
>
> Am Donnerstag, den 06.10.2016, 09:20 +0000 schrieb Richter, Michael:
>> Hi,
>>   
>> I’m using Ubuntu 12.04 on ~240 computers for years with this
>> configuration without problems. I’m now trying to migrate to Ubuntu
>> 16.04. Ubuntu is booted with readonly filesystem. A initramfs script
>> sets an union fs on top to bring write access. Nearly the same as on
>> every live CD.
>>   
>> On top there is the OpenAFS client. Which connects the users home
>> share on log on. But the OpenAFS client crashes on system boot.
>>   
>> If I disable OpenAFS completely and use accounts from another domain
>> without OpenAFS share, everything works. If I don’t use the overlay
>> and mount the drive read/write OpenAFS is working too. Only the
>> combination of OpenAFS and OverlayFS (or AuFS) is not working.
>>   
>> I also tried Ubuntu‘s Upstream Kernel and the OpenAFS client from
>> OpenAFS website. Nothing helped.
>>   
>> This is what I do in initramfs‘ init-bottom script:
>>   
>> ~~~
>> ro_mount_point="${rootmnt%/}.ro"
>> rw_mount_point="${rootmnt%/}.rw"
>>   
>> echo  Create mount points for the read-only and read/write layers:
>> mkdir "${ro_mount_point}" "${rw_mount_point}"
>>   
>> echo  Move the already-mounted root filesystem to the ro mount point:
>> mount --move "${rootmnt}" "${ro_mount_point}"
>>   
>> echo  Mount the read/write filesystem:
>> modprobe -r zram
>> modprobe zram num_devices=4
>> echo 1 > /sys/block/zram0/reset
>> echo lz4 > /sys/block/zram0/comp_algorithm
>> echo 2 > /sys/block/zram0/max_comp_streams
>> echo 3G > /sys/block/zram0/disksize
>> mke2fs /dev/zram0
>> mount -t ext2 /dev/zram0 "${rw_mount_point}"
>> # also tried tmpfs here
>> #mount -t tmpfs -o rw,noatime,mode=755 root.rw "${rw_mount_point}"
>> mkdir "${rw_mount_point}/upper"
>> mkdir "${rw_mount_point}/work"
>>   
>> echo  Mount the union:
>> mount -t overlay -o
>> "lowerdir=${ro_mount_point},upperdir=${rw_mount_point}/upper,workdir=
>> ${rw_mount_point}/work" overlay "${rootmnt}"
>>   
>> mkdir "${rootmnt}/ro" "${rootmnt}/rw"
>> mount --bind "${ro_mount_point}" "${rootmnt}/ro"
>> mount --bind "${rw_mount_point}" "${rootmnt}/rw"
>> ~~~
>>   
>> I also attached the crash part from kern.log.
>>   
>> Do someone know how to get this working? Is it a bug? Am I doing
>> something wrong?
>>   
>> Michael Richter
>>   
>> --
>> Michael Richter
>>   
>> Technische Universität Berlin
>> Universitätsbibliothek
>> IT-Service
>>   
>> Fasanenstraße 88, 10623 Berlin
>> Telefon: +49 (0)30 314-76310
>> m.richter@tu-berlin.de
>>   
>> www.ub.tu-berlin.de
>>   �����������������������������������Υ��/��&j)b�	b�өzpK��~����~��m�����b������i����?�������+-�w���^����)�


-- 
Dr. Karl Behler	
CODAC & IT services ASDEX Upgrade
phon +49 89 3299-1351 fax 3299-961351