Hello, i want to setup docker into openvz container with this howto: wiki.openvz.org/Docker_inside_CT . When i trying to run docker service, i have message about error in mounts: docker:~# bash -x /etc/init.d/docker start + set -e + export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin + PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin ++ basename /etc/init.d/docker + BASE=docker + DOCKER=/usr/bin/docker + DOCKER_PIDFILE=/var/run/docker.pid + DOCKER_SSD_PIDFILE=/var/run/docker-ssd.pid + DOCKER_LOGFILE=/var/log/docker.log + DOCKER_OPTS= + DOCKER_DESC=Docker + . /lib/lsb/init-functions +++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d ++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)' ++ '[' -r /lib/lsb/init-functions.d/20-left-info-blocks ']' ++ . /lib/lsb/init-functions.d/20-left-info-blocks ++ FANCYTTY= ++ '[' -e /etc/lsb-base-logging.sh ']' ++ true + '[' -f /etc/default/docker ']' + . /etc/default/docker + '[' -x /sbin/initctl ']' + '[' '!' -x /usr/bin/docker ']' + case "$1" in + fail_unless_root ++ id -u + '[' 0 '!=' 0 ']' + cgroupfs_mount + grep -v '^#' /etc/fstab + grep -q cgroup + '[' '!' -e /proc/cgroups ']' + '[' '!' -d /sys/fs/cgroup ']' + mountpoint -q /sys/fs/cgroup + cd /sys/fs/cgroup ++ awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups + for sys in '$(awk '\''!/^#/ { if ($4 == 1) print $1 }'\'' /proc/cgroups)' + mkdir -p cpuset + mountpoint -q cpuset + mount -n -t cgroup -o cpuset cgroup cpuset mount: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so + rmdir cpuset + for sys in '$(awk '\''!/^#/ { if ($4 == 1) print $1 }'\'' /proc/cgroups)' + mkdir -p cpu + mountpoint -q cpu + mount -n -t cgroup -o cpu cgroup cpu mount: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so + rmdir cpu + for sys in '$(awk '\''!/^#/ { if ($4 == 1) print $1 }'\'' /proc/cgroups)' + mkdir -p cpuacct + mountpoint -q cpuacct + mount -n -t cgroup -o cpuacct cgroup cpuacct mount: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so + rmdir cpuacct + for sys in '$(awk '\''!/^#/ { if ($4 == 1) print $1 }'\'' /proc/cgroups)' + mkdir -p devices + mountpoint -q devices + mount -n -t cgroup -o devices cgroup devices mount: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so + rmdir devices + for sys in '$(awk '\''!/^#/ { if ($4 == 1) print $1 }'\'' /proc/cgroups)' + mkdir -p freezer + mountpoint -q freezer + mount -n -t cgroup -o freezer cgroup freezer mount: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so + rmdir freezer + for sys in '$(awk '\''!/^#/ { if ($4 == 1) print $1 }'\'' /proc/cgroups)' + mkdir -p net_cls + mountpoint -q net_cls + mount -n -t cgroup -o net_cls cgroup net_cls mount: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so + rmdir net_cls + for sys in '$(awk '\''!/^#/ { if ($4 == 1) print $1 }'\'' /proc/cgroups)' + mkdir -p blkio + mountpoint -q blkio + for sys in '$(awk '\''!/^#/ { if ($4 == 1) print $1 }'\'' /proc/cgroups)' + mkdir -p perf_event + mountpoint -q perf_event + mount -n -t cgroup -o perf_event cgroup perf_event mount: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so + rmdir perf_event + for sys in '$(awk '\''!/^#/ { if ($4 == 1) print $1 }'\'' /proc/cgroups)' + mkdir -p net_prio + mountpoint -q net_prio + mount -n -t cgroup -o net_prio cgroup net_prio mount: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so + rmdir net_prio + for sys in '$(awk '\''!/^#/ { if ($4 == 1) print $1 }'\'' /proc/cgroups)' + mkdir -p memory + mountpoint -q memory + touch /var/log/docker.log + chgrp docker /var/log/docker.log + ulimit -n 1048576 + '[' /bin/bash ']' + ulimit -u 1048576 + log_begin_msg 'Starting Docker: docker' + log_begin_msg_pre 'Starting Docker: docker' + log_daemon_msg_pre 'Starting Docker: docker' + log_use_fancy_output + TPUT=/usr/bin/tput + EXPR=/usr/bin/expr + '[' -t 1 ']' + '[' xxterm '!=' x ']' + '[' xxterm '!=' xdumb ']' + '[' -x /usr/bin/tput ']' + '[' -x /usr/bin/expr ']' + /usr/bin/tput hpa 60 + /usr/bin/tput setaf 1 + '[' -z ']' + FANCYTTY=1 + case "$FANCYTTY" in + true + /bin/echo -n '[....] ' [....] + '[' -z 'Starting Docker: docker' ']' + /bin/echo -n 'Starting Docker: docker' Starting Docker: docker+ log_begin_msg_post 'Starting Docker: docker' + : + start-stop-daemon --start --background --no-close --exec /usr/bin/docker --pidfile /var/run/docker-ssd.pid --make-pidfile -- -d -p /var/run/docker.pid + log_end_msg 0 + '[' -z 0 ']' + local retval + retval=0 + log_end_msg_pre 0 + log_use_fancy_output + TPUT=/usr/bin/tput + EXPR=/usr/bin/expr + '[' -t 1 ']' + '[' xxterm '!=' x ']' + '[' xxterm '!=' xdumb ']' + '[' -x /usr/bin/tput ']' + '[' -x /usr/bin/expr ']' + /usr/bin/tput hpa 60 + /usr/bin/tput setaf 1 + '[' -z 1 ']' + true + case "$FANCYTTY" in + true ++ /usr/bin/tput setaf 1 + RED='' ++ /usr/bin/tput setaf 2 + GREEN='' ++ /usr/bin/tput setaf 3 + YELLOW='' ++ /usr/bin/tput op + NORMAL='' + /usr/bin/tput civis + /usr/bin/tput sc + /usr/bin/tput hpa 0 + '[' 0 -eq 0 ']' + /bin/echo -ne '[ ok ' [ ok + /usr/bin/tput rc + /usr/bin/tput cnorm + log_use_fancy_output + TPUT=/usr/bin/tput + EXPR=/usr/bin/expr + '[' -t 1 ']' + '[' xxterm '!=' x ']' + '[' xxterm '!=' xdumb ']' + '[' -x /usr/bin/tput ']' + '[' -x /usr/bin/expr ']' + /usr/bin/tput hpa 60 + /usr/bin/tput setaf 1 + '[' -z 1 ']' + true + case "$FANCYTTY" in + true ++ /usr/bin/tput setaf 1 + RED='' ++ /usr/bin/tput setaf 3 + YELLOW='' ++ /usr/bin/tput op + NORMAL='' + '[' 0 -eq 0 ']' + echo . . + log_end_msg_post 0 + : + return 0 When i trying to run docker, i have: docker:~# docker -D run ubuntu:14.04 /bin/echo 'Hello world' DEBU[0010] Corrupted prefix: [] DEBU[0010] [hijack] End of stdout DEBU[0010] End of CmdRun(), Waiting for hijack to finish. FATA[0010] Error response from daemon: Cannot start container 37334e43a8384e845594f16e3b76a3d0c4153cd91a24e9c7806a5ac80db44696: [8] System error: mountpoint for cpu not found I found this error is when docker havent cgroup for cpu, so i trying mount cpu cgroup support on host, but i cannot: root@lubtest03:~# mount sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=4115565,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=3294292k,mode=755) /dev/mapper/s-root on / type xfs (rw,relatime,attr2,delaylog,noquota) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=8266300k) /dev/mapper/s-docker on /fs/v/docker type xfs (rw,relatime,attr2,delaylog,noquota) rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) beancounter on /proc/vz/beancounter type cgroup (rw,relatime,blkio,name=beancounter) container on /proc/vz/container type cgroup (rw,relatime,freezer,devices,name=container) fairsched on /proc/vz/fairsched type cgroup (rw,relatime,cpuacct,cpu,cpuset,name=fairsched) /fs/v/docker/private on /fs/v/docker/root type simfs (rw,relatime) proc on /fs/v/docker/root/proc type proc (rw,nosuid,nodev,noexec,relatime) sysfs on /fs/v/docker/root/sys type sysfs (rw,nosuid,nodev,noexec,relatime) cgroup on /fs/v/docker/root/sys/fs/cgroup type tmpfs (rw,relatime) tmpfs on /fs/v/docker/root/var/run type tmpfs (rw,nosuid,noexec,relatime) tmpfs on /fs/v/docker/root/var/run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /fs/v/docker/root/var/run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime) devpts on /fs/v/docker/root/dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000) tmpfs on /fs/v/docker/root/run type tmpfs (rw,nosuid,noexec,relatime) /fs/v/docker/private on /fs/v/docker/root/run/lock type simfs (rw,relatime) tmpfs on /fs/v/docker/root/run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime) cgroup on /fs/v/docker/root/sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio,name=beancounter) cgroup on /fs/v/docker/root/sys/fs/cgroup/memory type cgroup (rw,relatime,memory) root@lubtest03:~# mkdir /fs/v/docker/root/sys/fs/cgroup/cpuset; mount -t cgroup cpuset -ocpuset /fs/v/docker/root/sys/fs/cgroup/cpuset mount: cpuset already mounted or /fs/v/docker/root/sys/fs/cgroup/cpuset busy root@lubtest03:~# mount | grep cpu fairsched on /proc/vz/fairsched type cgroup (rw,relatime,cpuacct,cpu,cpuset,name=fairsched) root@lubtest03:~# root@lubtest03:~# uname -r 2.6.32-openvz-042stab105.4-amd64 root@lubtest03:~# vzctl --version vzctl version 4.9.1 root@lubtest03:~# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.8 (wheezy) Release: 7.8 Codename: wheezy root@lubtest03:~# vzctl enter docker entered into CT 172320 docker:/# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.1 (wheezy) Release: 7.1 Codename: wheezy docker:/# What can i doing with this?
Hi wiuempe, I've been successful in getting Docker to run, but only on the following configuration: CentOS (6 or 7 with kernel 2.6.32-042stab108.2) host server with running a CentOS 7 container running Docker. The how-to on wiki.openvz.org/Docker_inside_CT works perfectly for my configuration. Except Docker uses up all inodes REALY fast so I'm still working on an optimal number for that.
hello, i have the same issue but with centos 7 it did not work i have on start container this Error: CT-55555 /# docker start 12ed179e86a8 Error response from daemon: Cannot start container 12ed179e86a8: [8] System error: write /sys/fs/cgroup/cpuset/system.slice/docker-12ed179e86a8c5253e 8b02d1f21edd82cb443a48575471a3654f55578323282f.scope/cgroup. procs: no space left on device Error: failed to start containers: [12ed179e86a8] Handler for POST /containers/{name:.*}/start returned error: Cannot start container 12ed179e86a8: [8] System error: write /sys/fs/cgroup/cpuset/system.slice/docker-12ed179e86a8c5253e 8b02d1f21edd82cb443a48575471a3654f55578323282f.scope/cgroup. procs: no space left on device ERRO[1198] HTTP Error err=Cannot start container 12ed179e86a8: [8] System error: write /sys/fs/cgroup/cpuset/system.slice/docker-12ed179e86a8c5253e 8b02d1f21edd82cb443a48575471a3654f55578323282f.scope/cgroup. procs: no space left on device statusCode=500 I thin docker an Virtuozzo does work together. This is not was Marketing said.
So how many inodes did you assign to your VM?
Hallo, Thank for answer, i use one namenöde an two Datenode. But the issue is exactly i iwant to run the Container.
I think you misunderstood me. The "inode" is a very specific filesystem term. The amount of inodes is something you set for each container. I haven't used docker and openvz together, but I see tburazin mentioning large demand for inodes due to docker. The lack of inodes could quite possibly translate into device space errors so I would advise you to check how much inodes have you assigned to a container running docker and try assigning more.
Thanks verry much, Where can i change this terms, in openVZ container?
Hi locara, the number of inodes is set per container. If you are experiencing a shortage of inodes you can check with the command: vzctl exec CTID df -i You can find some explanation regarding disk quotas here: https://openvz.org/Resource_shortage#Disk_quota The command to change number of inodes is: vzctl set CTID --diskinodes softlimit:hardlimit --save eg: vzctl set 101 --diskinodes 5000000:5500000 --save The default size is 2000000:2200000 if I remember correctly and it's recommended to allocate 200000 inodes per GB hard drive (for softlimit) and 220000 inodes per GB hard drive (hardlimit) You can go with a different amount, but be careful not to use up all your inodes on one container.