升级Ubuntu14.04 内核到Linux 4.2.0支持overlay

来源:互联网 发布:淘宝质量好的女鞋店铺 编辑:程序博客网 时间:2024/05/20 14:16

在ubuntu16.04上支持overlay,docker直接启用了overlay,在ubuntu 14.04上还是用aufs。
查看支持的文件系统:

root@os:~# modprobe overlay modprobe: FATAL: Module overlay not found.root@os:~# ls /lib/modules/3.13.0-32-generic/kernel/fs/overlayfs/overlay.kols: cannot access /lib/modules/3.13.0-32-generic/kernel/fs/overlayfs/overlay.ko: No such file or directoryroot@os:~# uname -aLinux os 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

看来内核太老,升级下内核试试:

apt-get install linux-generic-lts-wily

重启后查看内核版本:

root@os:~# uname -aLinux os 4.2.0-42-generic #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linuxroot@os:~# ls /lib/modules/4.2.0-42-generic/kernel/fs/overlayfs/overlay.ko/lib/modules/4.2.0-42-generic/kernel/fs/overlayfs/overlay.ko

docker启用overlay驱动,可以看到overlay驱动启用成功

root@os:~# /usr/bin/dockerd --dns 114.114.114.114 --registry-mirror=https://pee6w651.mirror.aliyuncs.com --storage-driver=overlay -DDEBU[0000] docker group found. gid: 999                 DEBU[0000] Listener created for HTTP on unix (/var/run/docker.sock) INFO[0000] libcontainerd: new containerd process, pid: 4545 DEBU[0000] libcontainerd: containerd connection state change: TRANSIENT_FAILURE WARN[0000] containerd: low RLIMIT_NOFILE changing to max  current=1024 max=4096DEBU[0000] containerd: read past events                  count=0DEBU[0000] containerd: supervisor running                cpus=8 memory=7983 runtime=docker-runc runtimeArgs=[] stateDir=/var/run/docker/libcontainerd/containerdDEBU[0000] containerd: grpc api on /var/run/docker/libcontainerd/docker-containerd.sock DEBU[0001] Using default logging driver json-file       DEBU[0001] Golang's threads limit set to 57240          DEBU[0001] [graphdriver] trying provided driver "overlay" DEBU[0001] Using graph driver overlay                   DEBU[0001] Max Concurrent Downloads: 3                  DEBU[0001] Max Concurrent Uploads: 5                    INFO[0001] Graph migration to content-addressability took 0.00 seconds WARN[0001] Your kernel does not support swap memory limit. 
0 0
原创粉丝点击