centos9平台下install aufs module

AUFS(Advanced Multi-layered Unification Filesystem)是一种联合文件系统,它能够将多个目录的内容合并并挂载到一个单一的目录中,从而提供一个统一的文件系统视图。
提供了高效的文件系统操作,支持镜像和容器的分层存储,节省存储空间,并且与 Docker 的集成非常紧密


env

  • centos9-stream
  • docker-v19.3

异常日志

journalctl -u docker --no-pager
....
msg="failed to load plugin io.containerd.snapshotter.v1.aufs" error="modprobe aufs failed: "modprobe: FATAL: Module aufs not found in 

The error modprobe: FATAL: Module aufs not found indicates that the AUFS (Another Union File System) kernel module is missing on your CentOS 9 system with kernel 5.14.0-432.el9.x86_64. AUFS is often required by older versions of Docker or container runtimes for storage, but newer kernels (especially in CentOS/RHEL 9) may not include AUFS by default.


If you specifically need AUFS (e.g., legacy systems), compile it manually:

  1. Install kernel headers and dependencies:
    1
    sudo dnf install kernel-devel-$(uname -r) gcc make
  2. Download and compile AUFS:
    1
    2
    3
    4
    git clone https://github.com/sfjro/aufs5-standalone.git
    cd aufs5-standalone
    make -j$(nproc)
    sudo make install
  3. Load the AUFS module:
    1
    sudo modprobe aufs
  4. Make the module load at boot:
    1
    echo "aufs" | sudo tee /etc/modules-load.d/aufs.conf

Note: This may not work on CentOS 9 kernels, as AUFS is deprecated and unsupported in newer kernels.