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.rich...@tu-berlin.de

www.ub.tu-berlin.de

Attachment: kern.log
Description: kern.log

Reply via email to