红联Linux门户
Linux帮助

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

发布时间:2017-01-14 15:06:20来源:linux网站作者:idwtwt
在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.ko
ls: cannot access /lib/modules/3.13.0-32-generic/kernel/fs/overlayfs/overlay.ko: No such file or directory
root@os:~# uname -a
Linux 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 -a
Linux 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/Linux
root@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 -D
DEBU[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=4096
DEBU[0000] containerd: read past events                  count=0
DEBU[0000] containerd: supervisor running                cpus=8 memory=7983 runtime=docker-runc runtimeArgs=[] stateDir=/var/run/docker/libcontainerd/containerd
DEBU[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.
 
本文永久更新地址:http://www.linuxdiyf.com/linux/27808.html