Let the Linux kernel support the AUFS file system
1. Linux 4.x patch with AUFS
Reference:
Docker installation: Get Docker Engine-Community for Ubuntu (https://docs.docker.com/install/linux/docker-ce/ubuntu/)
AUFS official website: http://aufs.sourceforge.net/ ★★★
AUFS official website: https://github.com/sfjro/aufs4-standalone
AUFS patch: Linux Kernel AUFS Patch (https://0066.in/archives/709?utm_source=tuicool&utm_medium=referral)
AUFS patch: Ubuntu 14.04 with 4.0. 4 kernel and latest AUFS from source (https://zackreed.me/ubuntu-14-04-with-4-0-4-kernel-and-latest-aufs-from-source/)
-
Check if the kernel supports AUFS
$ grep aufs /proc/filesystems nodev aufs
-
Check the FS driver used by Docker
$ docker info Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 0 Dirperm1 Supported: true
Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true
-
patch
git clone https://github.com/sfjro/aufs4-standalone.git aufs4-standalone.git cd aufs4-standalone.git/ git checkout origin/aufs4.0
## 标题: Linux Kernel AUFS Patch (https://0066.in/archives/709?utm_source=tuicool&utm_medium=referral) ## 作者:阿博 2016年11月26日 ## 以Linux Kernel目前最新stable的4.8.10为例。下载并解压内核源码 wget -c https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.10.tar.xz xz -d linux-4.8.10.tar.xz && tar xf linux-4.8.10.tar ## 下载补丁以及打补丁,需要注意的是第4行需指定对应的内核版本,现在是4.8.10所以对应是aufs4.8,如果是4.7.5那么对应就是aufs4.7,以此类推,本篇所提到的补丁仅适用内核在4.x以上版本,3.x的不适用。 cd linux-4.8.10 git clone git://github.com/sfjro/aufs4-standalone.git cd aufs4-standalone.git/ git checkout origin/aufs4.8 cd ../ ## 回到linux-4.8.10目录 cp -R aufs4-standalone.git/{ Documentation,fs} ./ cp aufs4-standalone.git/include/uapi/linux/aufs_type.h include/uapi/linux/ patch -p1 < aufs4-standalone.git/aufs4-kbuild.patch patch -p1 < aufs4-standalone.git/aufs4-base.patch patch -p1 < aufs4-standalone.git/aufs4-mmap.patch patch -p1 < aufs4-standalone.git/aufs4-standalone.patch ## 接下去就是常规的编译内核了,在内核配置界面中找到Filesystems,然后Miscellaneous filesystems,开启对应的aufs选项即可。
2. Linux 3.x patch with AUFS
Reference:
AUFS official website: https://github.com/sfjro/aufs3-linux
AUFS patch: https://metztli.blog/index.php/debian-patching-linux-kernel-to
- download
git clone git://git.code.sf.net/p/aufs/aufs3-standalone aufs3-standalone.git // 或 git clone https://github.com/sfjro/aufs3-linux.git aufs3-linux.git
- patch
cd linux 3.18.135 gzip -cd ../patch-3.x.gz | patch -p1 //Replace "x" for all versions bigger than the version "X" of your current source tree //or bzip2 -dc ../patch-3.x.bz2 | patch -p1 // Alternatively linux/scripts/patch-kernel linux