I have a VPS with Gentoo on it and the kernel overlay fs is not working.
These are the kernel options related to overlay
compiled into the kernel
cat .config | grep -i overlay
CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y
CONFIG_OVERLAY_FS=y
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
# CONFIG_OVERLAY_FS_INDEX is not set
# CONFIG_OVERLAY_FS_XINO_AUTO is not set
# CONFIG_OVERLAY_FS_METACOPY is not set
compiled as a module
cat .config | grep -i overlay
CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y
CONFIG_OVERLAY_FS=m
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
# CONFIG_OVERLAY_FS_INDEX is not set
# CONFIG_OVERLAY_FS_XINO_AUTO is not set
# CONFIG_OVERLAY_FS_METACOPY is not set
Message from dmesg when loaded into the kernel
dmesg | grep -i overlay
[ 10.144242] request_module fs-overlay succeeded, but still no fs?
Message from dmesg when compiled as a module
dmesg | grep -i overlay
[ 10.000001] request_module fs-overlay succeeded, but still no fs?
When compiled as module, the module is on the right place
locate overlay.ko
/lib/modules/6.1.46-gentoo/kernel/fs/overlayfs/overlay.ko
/usr/src/linux-6.1.46-gentoo/fs/overlayfs/.overlay.ko.cmd
/usr/src/linux-6.1.46-gentoo/fs/overlayfs/overlay.ko
cat /proc/filesystems | grep -i overlay comes empty.
The system is:
uname -a
Linux patito 6.1.31-gentoo #3 SMP PREEMPT_DYNAMIC Sun Jun 25 09:04:44 GMT 2023 x86_64 QEMU Virtual CPU version 2.5+ AuthenticAMD GNU/Linux
There is only one partition for the whole system running ext4, except /boot on a different ext4 partition.
The system has 2GB memory and plenty of space. I downloaded a snapshot of the system and ran it on my computer with virt-manager adding more memory and cpu cores, just for testing, and I got same results. Did a qemu-img convert to change from .img to qcow2 in case that helped but no change.
I have tried different kernels, recompiling with different options, removed all overlayfs sections, rebooting and reenabling them, searched for similar problems over Internet but I haven't found anything, any theories will be appreciated.
The overlayfs in the kernel is compiled as part of the kernel as shown above but I also tried to compile it as a module, it didn't load automatically and when I tried to load it manually with modprobe
, nothing happened but it didn't load, after running lsmod I wasn't there. I'll try again and add the kernel configuration to the above section.
cat /proc/filesystems | grep -i overlay
should outputnodev overlay
. The final objective is to have docker working with overlay2 but for now that doesn't work on the mentioned system.