Re: Frequent errors with OverlayFS on root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 1, 2020 at 9:01 PM Mauro Condarelli <mc5686@xxxxxxxxx> wrote:
>
> Hi,
> most likely this is not the right place to ask, please redirect me as needed.
>
> I'm trying to use OverlayFS to add (limited) write capability to a ReadOnly
> rootfs (SquashFS)
>
> Essentially (actual script is more complex, of course) boot-sequence includes:
>
> # /dev/mmcblk0p5: ext4 (upper+work+nwwroot+newroot/oldroot)
> # /dev/mmcblk0p6: SquashFS mounted on /
> mount /dev/mmcblk0p5 /overlay
> mount -t overlay overlay -o lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work  /overlay/newroot
> cd /overlay/newroot
> pivot_root . oldroot
> mount --move oldroot/dev /dev
> mount --move oldroot/proc /proc
>
> This works as expected, but, too often for comfort, some file
> (and sometime also directories) become unavailable due to error:
>
> overlayfs: invalid origin (ssh/sshd_config, ftype=8000, origin ftype=4000).
>
> File name changes, of course, but rest is fairly constant.
>
> This always happens when some file is written.
> Error persists reboots.
> Only way I found to "cure" the system is to go on "upper" and delete the file
> thus going back to "lower" version (in this case I should delete "/oldroot/overlay/upper/etc/ssh/sshd_config")
>
> This is a self-built kernel (Linux vocore 5.7.0 #2 PREEMPT Mon Aug 3 09:19:06 CEST 2020 mips GNU/Linux)
> on a custom target based on a SoC (MT7628).
>
> I am available to do any required test, but I have no idea about where to start.
>
> Any hint (or redirect) would be greatly appreciated.

This is probably your problem:
https://lore.kernel.org/linux-unionfs/32532923.JtPX5UtSzP@fgdesktop/

If it is, it should be solved by commit a888db310195
ovl: fix regression with re-formatted lower squashfs
in upstream kernel v5.9-rc1 or in stable kernel >= 5.7.10.

Thanks,
Amir.



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux