Docker运行,设备上没有剩余空间

[root@host ~]# docker run 9e7de9390856

Timestamp: 2015-06-15 22:20:58.8367035 +1000 AEST
Code: System error

Message: [/usr/bin/tar -xf /var/lib/docker/tmp/cde0f3a199597ac2e18e7efc7744c84a6c134adef31fb88b6982a8732f45efa5090033894/_tmp.tar -C /var/lib/docker/devicemapper/mnt/cde0f3a199597ac2e18e7efc7744c84a6c134adef31fb88b6982a8732f45efa5/rootfs/tmp .] failed: /usr/bin/tar: ./was/fixPack/7.0.0-WS-WASSDK-LinuxX64-FP0000027.pak: Wrote only 4608 of 10240 bytes
/usr/bin/tar: ./was/fixPack/wasFixPackInstallResponseFile: Cannot write: No space left on device
.
.
Cannot write: No spaFATA[0141] Error response from daemon: : exit status 2

df -h:

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda2      6.0G  3.2G  2.9G  52% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.8G     0  1.8G   0% /dev/shm
tmpfs           1.8G   17M  1.8G   1% /run
tmpfs           1.8G     0  1.8G   0% /sys/fs/cgroup
/dev/xvdb1       99G   28G   67G  30% /var/lib/docker

码头信息:

Containers: 2
Images: 34
Storage Driver: devicemapper
 Pool Name: docker-202:17-2621441-pool
 Pool Blocksize: 65.54 kB
 Backing Filesystem: extfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 15.89 GB
 Data Space Total: 107.4 GB
 Data Space Available: 76.3 GB
 Metadata Space Used: 10.27 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.137 GB
 Udev Sync Supported: true
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.93-RHEL7 (2015-01-28)
Execution Driver: native-0.2
Kernel Version: 3.10.0-229.el7.x86_64
Operating System: Red Hat Enterprise Linux Server 7.1 (Maipo)
CPUs: 2
Total Memory: 3.452 GiB
Name: ip-10-100-128-182.localdomain
ID: 4ZZZ:BSQD:GBKL:4Y3N:J6BL:47QE:3HMQ:GLMY:FPUK:CEPM:3EBP:ZU7G
Debug mode (server): true
Debug mode (client): false
Fds: 13
Goroutines: 18
System Time: Mon Jun 15 22:48:24 AEST 2015
EventsListeners: 0
Init SHA1: 836be3a369bfc6bd4cbd3ade1eedbafcc1ea05d0
Init Path: /usr/libexec/docker/dockerinit
Docker Root Dir: /var/lib/docker

uname -a:Linux ip-10-100-128-182.localdomain 3.10.0-229.el7.x86_64#1 SMP Thu Jan 29 18:37:38 EST 2015 x86_64 x86_64 x86_64 GNU / Linux

有人可以帮帮我吗?不确定这些信息是否足够 . 但尝试了几种解决方案,没有任何效果 .

docker version:Client version:1.6.0 Client API version:1.18 Go version(client):go1.4.2 Git commit(client):8aae715 / 1.6.0 OS / Arch(client):linux / amd64服务器版本:1.6.0服务器API版本:1.18 Go版本(服务器):go1.4.2 Git commit(服务器):8aae715 / 1.6.0 OS / Arch(服务器):linux / amd64

[root@host ~]# service docker status -l
Redirecting to /bin/systemctl status  -l docker.service
docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
   Active: active (running) since Tue 2015-06-16 00:31:46 AEST; 2min 2s ago
     Docs: http://docs.docker.com
 Main PID: 3306 (docker)
   CGroup: /system.slice/docker.service
           └─3306 /usr/bin/docker -d --storage-opt dm.basesize=30G --storage-opt dm.loopmetadatasize=4G

回答(1)

2 years ago

听起来你正试图从14GB图像启动一个容器 .

使用 devicemapper 存储驱动程序时,Docker容器默认只有10GB可用空间 . 您似乎正在使用 devicemapper 驱动程序,因此这可能是您的问题的根源 .

This article详细讨论了您需要使用的过程来增加容器文件系统的可用空间量 .

基于文件系统的驱动程序(如 overlay 驱动程序)没有相同的限制(但它们当然可能受到其他限制) .