#升级操作系统,centos7直接升级到7.3

yum clean all

yum update


#升级内核

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

yum --enablerepo=elrepo-kernel install  kernel-ml-devel kernel-ml -y

grub2-set-default 0

reboot


#安装docker


wget https://download.docker.com/linux/centos/docker-ce.repo -P /etc/yum.repos.d/

yum install -y  docker-ce


mkdir -p /data0/docker/var  && ln -s /data0/docker/var /var/lib/docker


mkdir /etc/docker/

echo "

{

  "storage-driver": "overlay2",

  "storage-opts": [ "overlay2.override_kernel_check=true" ],

  "registry-mirrors": ["https://pej3ico7.mirror.aliyuncs.com"],

  "insecure-registries":["10.211.121.26:5000","10.211.121.9:5000"],

  "live-restore" : false

}


" >> /etc/docker/daemon.json


systemctl  start docker



关闭selinxu  iptables    networkmanager

需要注意/etc/resolve,关闭networkmanager后无法正常使用域名访问。





报错:

level=error msg="[graphdriver] prior storage driver devicemapper failed: devmapper: Base Device UUID and Filesystem verification failed: devicemapper: Can't set cookie dm_task_set_cookie failed"

Aug 17 08:35:42 cephnode2 dockerd: Error starting daemon: error initializing graphdriver: devmapper: Base Device UUID and Filesystem verification failed: devicemapper: Can't set cookie dm_task_set_cookie failed


解决:

echo 'y' | sudo dmsetup udevcomplete_all



docker 重启后:

kernel:unregister_netdevice: waiting for lo to become free. Usage count = 1




rancher 灾备测试:


26server 删除重启   外挂数据库 ,重新启动server进程, 创建的swarm 业务不受影响。