docker起服务报错-->Volume group backing root filesystem could not be determined
journalctl -xe
1月 07 17:02:16 docker1 dockerd-current[10833]: time=“2020-01-07T17:02:16.980659994+08:00” level=fatal msg=“Error starting daemon: Devices cgroup isn’t mounted”
1月 07 17:02:16 docker1 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
1月 07 17:02:16 docker1 systemd[1]: Failed to start Docker Application Container Engine.
– Subject: Unit docker.service has failed
– Defined-By: systemd
—Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
– Unit docker.service has failed.
– The result is failed.
1月 07 17:02:16 docker1 systemd[1]: Unit docker.service entered failed state.
1月 07 17:02:16 docker1 systemd[1]: docker.service failed.
1月 07 17:04:03 docker1 systemd[1]: Starting Docker Storage Setup…
– Subject: Unit docker-storage-setup.service has begun start-up
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
– Unit docker-storage-setup.service has begun starting up.
1月 07 17:04:03 docker1 docker-storage-setup[10899]: INFO: Volume group backing root filesystem could not be determined
1月 07 17:04:03 docker1 docker-storage-setup[10899]: ERROR: No valid volume group found. Exiting.
1月 07 17:04:03 docker1 systemd[1]: docker-storage-setup.service: main process exited, code=exited, status=1/FAILURE
1月 07 17:04:03 docker1 systemd[1]: Failed to start Docker Storage Setup.
– Subject: Unit docker-storage-setup.service has failed
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
– Unit docker-storage-setup.service has failed.
– The result is failed.
1月 07 17:04:03 docker1 systemd[1]: Unit docker-storage-setup.service entered failed state.
1月 07 17:04:03 docker1 systemd[1]: docker-storage-setup.service failed.
1月 07 17:04:03 docker1 systemd[1]: Starting Docker Application Container Engine…
– Subject: Unit docker.service has begun start-up
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
– Unit docker.service has begun starting up.
1月 07 17:04:03 docker1 dockerd-current[10918]: time=“2020-01-07T17:04:03.980434061+08:00” level=info msg=“libcontainerd: new containerd process, pid: 10925”
1月 07 17:04:05 docker1 dockerd-current[10918]: time=“2020-01-07T17:04:05.044470541+08:00” level=warning msg=“devmapper: Usage of loopback devices is strongly discouraged for production use. Please use --storage-opt dm.thinpooldev
or use man docker
to refer to dm.thin
1月 07 17:04:05 docker1 dockerd-current[10918]: time=“2020-01-07T17:04:05.066103343+08:00” level=warning msg=“devmapper: Base device already exists and has filesystem xfs on it. User specified filesystem will be ignored.”
1月 07 17:04:05 docker1 dockerd-current[10918]: time=“2020-01-07T17:04:05.076636435+08:00” level=info msg=”[graphdriver] using prior storage driver “devicemapper”"
1月 07 17:04:05 docker1 dockerd-current[10918]: time=“2020-01-07T17:04:05.079845513+08:00” level=warning msg=“Docker could not enable SELinux on the host system”
1月 07 17:04:05 docker1 dockerd-current[10918]: time=“2020-01-07T17:04:05.111464205+08:00” level=info msg=“Graph migration to content-addressability took 0.00 seconds”
1月 07 17:04:05 docker1 dockerd-current[10918]: time=“2020-01-07T17:04:05.112442898+08:00” level=warning msg=“Unable to find cpu cgroup in mounts”
1月 07 17:04:05 docker1 dockerd-current[10918]: time=“2020-01-07T17:04:05.113026240+08:00” level=warning msg=“Unable to find blkio cgroup in mounts”
1月 07 17:04:05 docker1 dockerd-current[10918]: time=“2020-01-07T17:04:05.113622773+08:00” level=warning msg=“Unable to find cpuset cgroup in mounts”
1月 07 17:04:05 docker1 dockerd-current[10918]: time=“2020-01-07T17:04:05.114337966+08:00” level=warning msg=“mountpoint for pids not found”
1月 07 17:04:05 docker1 dockerd-current[10918]: time=“2020-01-07T17:04:05.251661884+08:00” level=fatal msg=“Error starting daemon: Devices cgroup isn’t mounted”
1月 07 17:04:05 docker1 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
1月 07 17:04:05 docker1 systemd[1]: Failed to start Docker Application Container Engine.
– Subject: Unit docker.service has failed
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
– Unit docker.service has failed.
– The result is failed.
1月 07 17:04:05 docker1 systemd[1]: Unit docker.service entered failed state.
1月 07 17:04:05 docker1 systemd[1]: docker.service failed.
执行一下脚本↓
脚本出处:https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount#L4
@Tianon Gravi
#!/bin/sh
#Copyright 2011 Canonical, Inc
#2014 Tianon Gravi
#Author: Serge Hallyn [email protected]
#Tianon Gravi [email protected]
set -e
#for simplicity this script provides no flexibility
#if cgroup is mounted by fstab, don’t run
#don’t get too smart - bail on any uncommented entry with ‘cgroup’ in it
if grep -v ‘^#’ /etc/fstab | grep -q cgroup; then
echo ‘cgroups mounted from fstab, not mounting /sys/fs/cgroup’
exit 0
fi
#kernel provides cgroups?
if [ ! -e /proc/cgroups ]; then
exit 0
fi
#if we don’t even have the directory we need, something else must be wrong
if [ ! -d /sys/fs/cgroup ]; then
exit 0
fi
#mount /sys/fs/cgroup if not already done
if ! mountpoint -q /sys/fs/cgroup; then
mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
fi
cd /sys/fs/cgroup
#get/mount list of enabled cgroup controllers
for sys in $(awk ‘!/^#/ { if ($4 == 1) print $1 }’ /proc/cgroups); do
mkdir -p $sys
if ! mountpoint -q $sys; then
if ! mount -n -t cgroup -o $sys cgroup $sys; then
rmdir $sys || true
fi
fi
done
#example /proc/cgroups:
#subsys_name hierarchy num_cgroups enabled
#cpuset 2 3 1
#cpu 3 3 1
#cpuacct 4 3 1
#memory 5 3 0
#devices 6 3 1
#freezer 7 3 1
#blkio 8 3 1
exit 0