I get this error when I try to build a docker file
error creating aufs mount to /var/lib/docker/aufs/mnt
/6c1b42ce1a98b1c0f2d2a7f17c196221445f1054566065d4c607e4f1b99930eb-init:
invalid argument
What does it mean? How do I fix it?
asked Jun 22, 2015 at 15:58
larslars
1,9565 gold badges33 silver badges46 bronze badges
I had some unresolved errors after removing /var/lib/docker/aufs, which a couple extra steps cleared up.
To add to @benwalther answer, since I lack the reputation to comment:
# Cleaning up through docker avoids these errors
# ERROR: Service 'master' failed to build:
# open /var/lib/docker/aufs/layers/<container_id>: no such file or directory
# ERROR: Service 'master' failed to build: failed to register layer:
# open /var/lib/docker/aufs/layers/<container_id>: no such file or directory
docker rm -f $(docker ps -a -q)
docker rmi -f $(docker images -a -q)
# As per @BenWalther's answer above
sudo service docker stop
sudo rm -rf /var/lib/docker/aufs
# Removing the linkgraph.db fixed this error:
# Conflict. The name "/jenkins_data_1" is already in use by container <container_id>.
# You have to remove (or rename) that container to be able to reuse that name.
sudo rm -f /var/lib/docker/linkgraph.db
sudo service docker start
answered Feb 25, 2016 at 14:43
6
If you try to use docker inside a persistent enable Live CD, you may encounter this error. I guess, it is due to the fact that you can’t mount aufs inside overlayfs mounts, which is the persistent layer.
The solution was simply using different driver. I’ve used vfs in /etc/docker/daemon.json
Here it is
{
"storage-driver": "vfs"
}
answered Sep 16, 2019 at 8:31
AnwarAnwar
1,7261 gold badge21 silver badges32 bronze badges
7
I have removed /var/lib/docker/aufs/diff and got the same problem:
error creating aufs mount to /var/lib/docker/aufs/mnt/blah-blah-init: invalid argument
It solved by running the following commands:
docker stop $(docker ps -a -q);
docker rm $(docker ps -a -q);
docker rmi -f $(docker images -a -q)
Qiu
5,54110 gold badges49 silver badges56 bronze badges
answered Aug 25, 2017 at 6:38
ArtArt
1511 silver badge2 bronze badges
3
AUFS is unable to mount the docker container filesystem.
This is either because: the path is already mounted — or — there’s a race condition in docker’s interaction with AUFS, due to the large amount of existing volumes.
To solve this, try the following:
-
restart the docker service or daemon and try again.
-
check
mountfor aufs mounted on any paths under/var/lib/docker/aufs/. If found, stop docker, thenumountthem (need sudo).example:
mount
none on /var/lib/docker/aufs/mnt/55639da9aa959e88765899ac9dc200ccdf363b2f09ea933370cf4f96051b22b9 type aufs (rw,relatime,si=5abf628bd5735419,dio,dirperm1)
then
sudo umount /var/lib/docker/aufs/mnt/55639da9aa959e88765899ac9dc200ccdf363b2f09ea933370cf4f96051b22b9
- If that doesn’t work, stop docker, then
sudo rm -rf /var/lib/docker/aufs. You will lose any existing stopped containers and all images. But this is just about guaranteed to solve the problem.
answered Jul 17, 2015 at 3:04
Ben WaltherBen Walther
1,5959 silver badges18 bronze badges
Unfortunately on my system I could not resolve this with the above answers. The docker administration kept remembering a certain file in the aufs layer that it couldn’t reach anymore. Other solutions didn’t work either. So if this is an option for you, you could try the following fix: uninstall/purge docker and docker-engine:
apt-get purge docker docker-engine
Then make sure everything from /var/lib/docker is removed.
rm -rf /var/lib/docker
After that install docker again.
answered Aug 4, 2017 at 15:56
BonoBono
4,6896 gold badges47 silver badges76 bronze badges
I’m using Raspbian with Raspberry 4
Best way to do it..
Check your docker version with:
sudo docker info and check «Storage Driver»
sudo systemctl stop dockersudo nano /etc/docker/daemon.json- write this code below and save it
{
"storage-driver": "vfs"
}
sudo systemctl start docker
altought vfs… has a performance issue and could not be the best choice… 
answered Oct 4, 2020 at 14:43
k3n tinhuk3n tinhu
611 silver badge2 bronze badges
I just had a similar issue on Lubuntu (Ubuntu 4.15.0-20-generic) with Docker CE 18.03. None of the described options helped.
It appears that latest docker versions use the overlay2 storage driver. However some applications require aufs. Thus a possible fix might be to simply use this docker guide to change the storage driver to aufs (simply replace «overlay2» with «aufs») as in this guide.
answered Jul 27, 2018 at 13:38
2
I am running a container inside another container(also installed docker in that container) and is trying to create an aufs storage on top of an overlayfs mount, which is not possible. So, I also change the host overlyfs storage to aufs. It’s solve my issue. To check storage driver use below command.
docker info
The solution was simply using different driver. I’ve used aufs in /etc/docker/daemon.json
Here it is
{
"storage-driver": "aufs"
}
For detailed explanation read below documentation.
Docker storage documentation
answered Jun 11, 2021 at 1:50
ZahidZahid
3606 silver badges14 bronze badges
A similar issue arose while I was using Docker in Windows:
ERROR: Service 'daemon' failed to build: error creating overlay mount
to /var/lib/docker/overlay2/83c98f716020954420e8b89e6074b1af6
1b2b86cd51ac6a54724ed263b3663a2-init/merged: no such file or directory
The problem occurred after having removed a volume from the image’s Dockerfile, rebuilding the image and then rebooting the PC. Maybe this is a common cause?
I managed to solve the problem by clicking Docker -> Settings -> Reset -> Reset to factory defaults...
All my images were subsequently lost but that didn’t matter for me. I also figured that removing the VM disk image (the path to which can be found under the Advanced tab in Settings) could solve the issue. I haven’t tried this approach however.
answered Jul 4, 2018 at 17:28
whitebrowwhitebrow
1,96520 silver badges22 bronze badges
1
In windows after a restart, docker machine problem is solved for me.
Use these commands:
docker-machine stop
docker-machine start
docker-compose up
Javier C.
7,4915 gold badges40 silver badges52 bronze badges
answered Sep 14, 2017 at 11:38
Aliaga AliyevAliaga Aliyev
4151 gold badge6 silver badges21 bronze badges
I put this answer also here, as the google search lead me here since the @whitebrow’s answer contains what term I searched for in google
ERROR: Service '***' failed to build: error creating overlay mount
to /var/lib/docker/overlay2/***/merged: no such file or directory
In my case, the working workaround surprisingly was to restrict the number of ‘RUN’ docker building commands/layers, since if the number surpassed 60 layers/commands, it always ended up with that missing ‘merged’ folder error, no matter what was the contents of the command, even simple command such as RUN ls -la ended up with that error, if the total number of such/any commands was higher than about 60, strange. Merged subfolder was always missing, though even when I automatically generated all the merged subfolders, always was created on the fly a new layer with a new hash, which was missing that subfolder.
answered May 12, 2020 at 15:43
FantomX1FantomX1
1,4672 gold badges15 silver badges21 bronze badges
- [] This is a bug report
- This is a feature request
- I searched existing issues before opening this one
Expected behavior
setup rancher in different container
adding host on other container gives the below error.
Actual behavior
Steps to reproduce the behavior
Output of docker version:
Client: Version: 18.06.1-ce API version: 1.38
Go version: go1.10.3 Git commit: e68fc7a
Built: Tue Aug 21 17:24:51 2018
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:23:15 2018
OS/Arch: linux/amd64 Experimental: false
Output of docker info:
/var/lib/docker# docker version
Client: Version: 18.06.1-ce API version: 1.38
Go version: go1.10.3 Git commit: e68fc7a
Built: Tue Aug 21 17:24:51 2018
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:23:15 2018
OS/Arch: linux/amd64 Experimental: false
Additional environment details (AWS, VirtualBox, physical, etc.)
Содержание
- Docker: error creating aufs mount to /var/lib/docker/aufs/mnt/ #917
- Comments
- Expected behavior
- Actual behavior
- Steps to reproduce the behavior
- Error response from daemon: error creating aufs mount: read-only file system. #20805
- Comments
- Error creating aufs mount: invalid argument #21531
- Comments
- Footer
Docker: error creating aufs mount to /var/lib/docker/aufs/mnt/ #917
- [] This is a bug report
- This is a feature request
- I searched existing issues before opening this one
Expected behavior
setup rancher in different container
adding host on other container gives the below error.
Actual behavior
Steps to reproduce the behavior
Output of docker version :
Client: Version: 18.06.1-ce API version: 1.38
Go version: go1.10.3 Git commit: e68fc7a
Built: Tue Aug 21 17:24:51 2018
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:23:15 2018
OS/Arch: linux/amd64 Experimental: false
Output of docker info :
/var/lib/docker# docker version
Client: Version: 18.06.1-ce API version: 1.38
Go version: go1.10.3 Git commit: e68fc7a
Built: Tue Aug 21 17:24:51 2018
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:23:15 2018
OS/Arch: linux/amd64 Experimental: false
Additional environment details (AWS, VirtualBox, physical, etc.)
The text was updated successfully, but these errors were encountered:
Источник
Error response from daemon: error creating aufs mount: read-only file system. #20805
Output of docker version :
Output of docker info :
I’m trying to create an image and i always got this error message
docker: Error response from daemon: error creating aufs mount to /var/lib/docker/aufs/mnt/620674e960aeccd817471c2bbb1c8df0ce0f58d8ab6c1ff6b87e7cf7919e48c2-init: read-only file system. See ‘docker run —help’.
Of course every time with a different /var/lib/docker/aufs/mnt/-init/ folder, I thought of a permission problem but root is able to create and delete files or folder in /mnt/ path.
I tried to remove, install and reboot but I’m out of new ideas.
Provide additional environment details (AWS, VirtualBox, physical, etc.):
List the steps to reproduce the issue:
Describe the results you received:
docker: Error response from daemon: error creating aufs mount to /var/lib/docker/aufs/mnt/620674e960aeccd817471c2bbb1c8df0ce0f58d8ab6c1ff6b87e7cf7919e48c2-init: read-only file system.
See ‘docker run —help’.
Describe the results you expected:
I’m expecting that docker create a container from hello-world image and i’m able to run it.
Provide additional info you think is important:
I’m facing this problem with any image i try to build or run
The text was updated successfully, but these errors were encountered:
1 .How did you install that docker in vmware vm ?
2. What’s the debug level logs in docker daemon ?
How is the daemon started? Is it running as root?
I installed it following this guide: https://docs.docker.com/engine/installation/linux/ubuntulinux/
and also using the script with curl -sSL https://get.docker.com/ | sh
The daemon is started from ubuntu init script services docker start
To generate daemon debug log i firstly run it with sudo docker daemon -D and then docker run hello-world
DEBU[0000] docker group found. gid: 999
DEBU[0000] Server created for HTTP on unix (/var/run/docker.sock)
DEBU[0000] Using default logging driver json-file
INFO[0000] [graphdriver] using prior storage driver «aufs»
DEBU[0000] Using graph driver aufs
INFO[0000] Graph migration to content-addressability took 0.00 seconds
DEBU[0000] Option DefaultDriver: bridge
DEBU[0000] Option DefaultNetwork: bridge
INFO[0000] Firewalld running: false
DEBU[0000] /sbin/iptables, [—wait -t nat -D PREROUTING -m addrtype —dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t nat -D OUTPUT -m addrtype —dst-type LOCAL ! —dst 127.0.0.0/8 -j DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t nat -D OUTPUT -m addrtype —dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t nat -D PREROUTING]
DEBU[0000] /sbin/iptables, [—wait -t nat -D OUTPUT]
DEBU[0000] /sbin/iptables, [—wait -t nat -F DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t nat -X DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t filter -F DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t filter -X DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t filter -F DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [—wait -t filter -X DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [—wait -t nat -n -L DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t nat -N DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t filter -n -L DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t filter -n -L DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [—wait -t filter -C DOCKER-ISOLATION -j RETURN]
DEBU[0000] /sbin/iptables, [—wait -I DOCKER-ISOLATION -j RETURN]
DEBU[0000] Registering ipam driver: «default»
DEBU[0000] releasing IPv4 pools from network bridge (5ca2c167e983ee2b12873769023b6882adcc97649ce7076650ace94e01b7ea1d)
DEBU[0000] ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.1)
DEBU[0000] ReleasePool(LocalDefault/172.17.0.0/16)
INFO[0000] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option —bip can be used to set a preferred IP address
DEBU[0000] Allocating IPv4 pools for network bridge (6bcb0b0fd38a8fa4db19905b96aade51362f4871c5da4da9a251cb8cf8f23773)
DEBU[0000] RequestPool(LocalDefault, 172.17.0.0/16, , map[], false)
DEBU[0000] RequestAddress(LocalDefault/172.17.0.0/16, 172.17.0.1, map[RequestAddressType:com.docker.network.gateway])
DEBU[0000] /sbin/iptables, [—wait -t nat -C POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE]
DEBU[0000] /sbin/iptables, [—wait -t nat -C DOCKER -i docker0 -j RETURN]
DEBU[0000] /sbin/iptables, [—wait -t nat -I DOCKER -i docker0 -j RETURN]
DEBU[0000] /sbin/iptables, [—wait -D FORWARD -i docker0 -o docker0 -j DROP]
DEBU[0000] /sbin/iptables, [—wait -t filter -C FORWARD -i docker0 -o docker0 -j ACCEPT]
DEBU[0000] /sbin/iptables, [—wait -t filter -C FORWARD -i docker0 ! -o docker0 -j ACCEPT]
DEBU[0000] /sbin/iptables, [—wait -t filter -C FORWARD -o docker0 -m conntrack —ctstate RELATED,ESTABLISHED -j ACCEPT]
DEBU[0000] /sbin/iptables, [—wait -t nat -C PREROUTING -m addrtype —dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t nat -A PREROUTING -m addrtype —dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t nat -C OUTPUT -m addrtype —dst-type LOCAL -j DOCKER ! —dst 127.0.0.0/8]
DEBU[0000] /sbin/iptables, [—wait -t nat -A OUTPUT -m addrtype —dst-type LOCAL -j DOCKER ! —dst 127.0.0.0/8]
DEBU[0000] /sbin/iptables, [—wait -t filter -C FORWARD -o docker0 -j DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t filter -C FORWARD -o docker0 -j DOCKER]
DEBU[0000] /sbin/iptables, [—wait -t filter -C FORWARD -j DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [—wait -D FORWARD -j DOCKER-ISOLATION]
DEBU[0000] /sbin/iptables, [—wait -I FORWARD -j DOCKER-ISOLATION]
WARN[0000] Your kernel does not support swap memory limit.
DEBU[0000] Cleaning up old shm/mqueue mounts: start.
DEBU[0000] Cleaning up old shm/mqueue mounts: done.
INFO[0000] Daemon has completed initialization
INFO[0000] Docker daemon commit=c3959b1 execdriver=native-0.2 graphdriver=aufs version=1.10.2
DEBU[0000] Registering routers
DEBU[0000] Registering HEAD, /containers/>/archive
DEBU[0000] Registering GET, /containers/json
DEBU[0000] Registering GET, /containers/>/export
DEBU[0000] Registering GET, /containers/>/changes
DEBU[0000] Registering GET, /containers/>/json
DEBU[0000] Registering GET, /containers/>/top
DEBU[0000] Registering GET, /containers/>/logs
DEBU[0000] Registering GET, /containers/>/stats
DEBU[0000] Registering GET, /containers/>/attach/ws
DEBU[0000] Registering GET, /exec/>/json
DEBU[0000] Registering GET, /containers/>/archive
DEBU[0000] Registering POST, /containers/create
DEBU[0000] Registering POST, /containers/>/kill
DEBU[0000] Registering POST, /containers/>/pause
DEBU[0000] Registering POST, /containers/>/unpause
DEBU[0000] Registering POST, /containers/>/restart
DEBU[0000] Registering POST, /containers/>/start
DEBU[0000] Registering POST, /containers/>/stop
DEBU[0000] Registering POST, /containers/>/wait
DEBU[0000] Registering POST, /containers/>/resize
DEBU[0000] Registering POST, /containers/>/attach
DEBU[0000] Registering POST, /containers/>/copy
DEBU[0000] Registering POST, /containers/>/exec
DEBU[0000] Registering POST, /exec/>/start
DEBU[0000] Registering POST, /exec/>/resize
DEBU[0000] Registering POST, /containers/>/rename
DEBU[0000] Registering POST, /containers/>/update
DEBU[0000] Registering PUT, /containers/>/archive
DEBU[0000] Registering DELETE, /containers/>
DEBU[0000] Registering GET, /images/json
DEBU[0000] Registering GET, /images/search
DEBU[0000] Registering GET, /images/get
DEBU[0000] Registering GET, /images/>/get
DEBU[0000] Registering GET, /images/>/history
DEBU[0000] Registering GET, /images/>/json
DEBU[0000] Registering POST, /commit
DEBU[0000] Registering POST, /images/create
DEBU[0000] Registering POST, /images/load
DEBU[0000] Registering POST, /images/>/push
DEBU[0000] Registering POST, /images/>/tag
DEBU[0000] Registering DELETE, /images/>
DEBU[0000] Registering GET, /networks
DEBU[0000] Registering GET, /networks/>
DEBU[0000] Registering POST, /networks/create
DEBU[0000] Registering POST, /networks/>/connect
DEBU[0000] Registering POST, /networks/>/disconnect
DEBU[0000] Registering DELETE, /networks/>
DEBU[0000] Registering OPTIONS, />
DEBU[0000] Registering GET, /ping
DEBU[0000] Registering GET, /events
DEBU[0000] Registering GET, /info
DEBU[0000] Registering GET, /version
DEBU[0000] Registering POST, /auth
DEBU[0000] Registering GET, /volumes
DEBU[0000] Registering GET, /volumes/>
DEBU[0000] Registering POST, /volumes/create
DEBU[0000] Registering DELETE, /volumes/
DEBU[0000] Registering POST, /build
INFO[0000] API listen on /var/run/docker.sock
DEBU[0035] Calling POST /v1.22/containers/create
DEBU[0035] POST /v1.22/containers/create
DEBU[0035] form data: <«AttachStderr»:true,»AttachStdin»:false,»AttachStdout»:true,»Cmd»:null,»Domainname»:»»,»Entrypoint»:null,»Env»:[],»HostConfig»:<«Binds»:null,»BlkioDeviceReadBps»:null,»BlkioDeviceReadIOps»:null,»BlkioDeviceWriteBps»:null,»BlkioDeviceWriteIOps»:null,»BlkioWeight»:0,»BlkioWeightDevice»:null,»CapAdd»:null,»CapDrop»:null,»CgroupParent»:»»,»ConsoleSize»:[0,0],»ContainerIDFile»:»»,»CpuPeriod»:0,»CpuQuota»:0,»CpuShares»:0,»CpusetCpus»:»»,»CpusetMems»:»»,»Devices»:[],»Dns»:[],»DnsOptions»:[],»DnsSearch»:[],»ExtraHosts»:null,»GroupAdd»:null,»IpcMode»:»»,»Isolation»:»»,»KernelMemory»:0,»Links»:null,»LogConfig»:<«Config»:<>,»Type»:»»>,»Memory»:0,»MemoryReservation»:0,»MemorySwap»:0,»MemorySwappiness»:-1,»NetworkMode»:»default»,»OomKillDisable»:false,»OomScoreAdj»:0,»PidMode»:»»,»PidsLimit»:0,»PortBindings»:<>,»Privileged»:false,»PublishAllPorts»:false,»ReadonlyRootfs»:false,»RestartPolicy»:<«MaximumRetryCount»:0,»Name»:»no»>,»SecurityOpt»:null,»ShmSize»:0,»UTSMode»:»»,»Ulimits»:null,»VolumeDriver»:»»,»VolumesFrom»:null>,»Hostname»:»»,»Image»:»hello-world»,»Labels»:<>,»NetworkingConfig»:<«EndpointsConfig»:<>>,»OnBuild»:null,»OpenStdin»:false,»StdinOnce»:false,»StopSignal»:»SIGTERM»,»Tty»:false,»User»:»»,»Volumes»:<>,»WorkingDir»:»»>
ERRO[0035] Couldn’t run auplink before unmount: exit status 22
ERRO[0035] Clean up Error! Cannot destroy container 055f8f4a96c0a848d3147583d25e1c7ea400b887d3305d616e45893580e67b41: nosuchcontainer: No such container: 055f8f4a96c0a848d3147583d25e1c7ea400b887d3305d616e45893580e67b41
ERRO[0035] Handler for POST /v1.22/containers/create returned error: error creating aufs mount to /var/lib/docker/aufs/mnt/82a88073636e7c543c2079e2b3f3eee3076c1adb869894276a301b1c6e4ad00d-init: read-only file system
Hm, possibly this is the error; Couldn’t run auplink before unmount: exit status 22
read-only file system could also mean a general issue with the filesystem have you tried fsck just to be sure?
Источник
Error creating aufs mount: invalid argument #21531
I am running an instance of Ubuntu 14.04 booted via iPXE whose filesystem is mounted on a remote EC2 server. I have installed docker to the system as per instructions here
However when i run
sudo docker run hello-world
I obtain the output
This issue seems to be different from #13742.
I have tried the solution presented here
which did not affect the command.
Output of mount :
Output of sudo docker version :
Output of sudo docker info :
The text was updated successfully, but these errors were encountered:
what’s your filesystem type of /home/ubuntu/docker/aufs ? I found it said backing fileystem is unknown.
is it NFS ? or something ?
The backing filesystem is NFS.
@teogelles I did not think docker support NFS for containers and images.
ping @thaJeztah may know clearly about it.
Yeah, I don’t think running on NFS works, see for example #15239 and #21086
Would it be possible to make docker run in RAM, perhaps with a tmpfs ramdisk mounted to, say, /mnt/ramdisk? For my applications the containers would be relatively small and should fit in memory. @thaJeztah I noticed you answered a similar question in #10490 where you suggested
docker -d -g /path/to/ramdisk
but mentioned it was highly experimental. Has this solution gotten any more stable?
@teogelles it’s not something we worked on as a use-case so I think that’d be still «at your own risk». Any reason to mount it in memory though? If there’s not much disk activity, I don’t think it’ll bring much advantage
I’m closing this in favour of #21086. Please comment on that issue instead.
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Let’s have a look at the Docker error creating AUFS mount and its solution by our Docker Hosting Support Services at Bobcares.
Docker error creating AUFS mount
AUFS is a Docker storage driver. Docker storage drivers have control over how images and containers are stored on your filesystem. They’re the mechanism that allows you to create images, start containers, and modify writable layers, the aufs was one among the default storage drivers before overlay2.
Live USB is certainly not ext4 or one of the other supported filesystems. Most likely it’s doing an overlay and here we are not sure if can mount overlayfs on top of an overlayfs. However, you can look up on to your current filesystem for /var/lib/docker with a mount command.
# df /var/lib/docker/.
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/bmitch--vg-homelv 720798904 437701948 246459468 64% /home
# mount | grep /dev/mapper/bmitch
/dev/mapper/bmitch--vg-homelv on /home type ext4 (rw,relatime,data=ordered)
Now maybe an issue occurs if your Docker configuration has a different setup for the storage driver, then the solution to fix that configuration is to use aufs like this:
- Stop Docker
sudo systemctl stop docker - Open the Docker daemon file
sudo vi /etc/docker/daemon.json - Add the following to the daemon file and save it
{ "storage-driver": "aufs" } - Start Docker again
sudo systemctl start docker
Solution for errors after removing /var/lib/docker/aufs, which a couple of extra steps cleared up.
# Cleaning up through docker avoids these errors
# ERROR: Service 'master' failed to build:
# open /var/lib/docker/aufs/layers/<container_id>: no such file or directory
# ERROR: Service 'master' failed to build: failed to register layer:
# open /var/lib/docker/aufs/layers/<container_id>: no such file or directory
docker rm -f $(docker ps -a -q)
docker rmi -f $(docker images -a -q)
sudo service docker stop
sudo rm -rf /var/lib/docker/aufs
# Removing the linkgraph.db fixed this error:
# Conflict. The name "/jenkins_data_1" is already in use by container <container_id>.
# You have to remove (or rename) that container to be able to reuse that name.
sudo rm -f /var/lib/docker/linkgraph.db
sudo service docker start
If you try to use docker inside a persistent enable Live CD, then you may encounter an error due to the fact that you can’t mount AUFS inside overlayfs, which is the persistent layer.
The solution was simply using a different driver. here we have used vfs in /etc/docker/daemon.json
{
"storage-driver": "vfs"
}
If you get AUFS unable to mount the docker container filesystem. This is either because the path already mounted or there’s a race condition in docker’s interaction with AUFS, due to a large number of existing volumes.
To solve this, try the following:
- Try to restart the docker service or daemon and then try again.
- Check for aufs mounted on any paths under
/var/lib/docker/aufs/and if found any then stop docker,umountthem.
If your system could not resolve this with the above answers and docker administration keeps remembering a certain file in the aufs layer that it couldn’t reach anymore. Then you could try the following fix: uninstall/purge docker and docker-engine:
apt-get purge docker docker-engine
Make sure everything from /var/lib/docker is removed.
rm -rf /var/lib/docker
Finally, install the docker once again.
[Looking for a solution to another query? We are just a click away.]
Conclusion
Docker error creating AUFS mount is either because the path already mounted or there’s a race condition in docker’s interaction with AUFS. Docker storage drivers have control over the images and containers stored on the filesystem.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
GET STARTED
1 answer to this question.
Hi@akhtar,
To solve this error, you have to check if this /var/lib/docker/aufs/mnt is mounted or not. To check you can use mount -l command.
If the folder is mounted, then follow the bellow given steps.
$ docker stop -f $(docker ps -a -q) //it will stop all the containers. $ docker rm -f $(docker ps -a -q) //Remove all the containers. $ docker rmi -f $(docker images -q) //Remove all the images.
Hope this will work.
answered
Apr 16, 2020
by
MD
• 95,420 points
Related Questions In Docker
- All categories
-
ChatGPT
(4) -
Apache Kafka
(84) -
Apache Spark
(596) -
Azure
(131) -
Big Data Hadoop
(1,907) -
Blockchain
(1,673) -
C#
(141) -
C++
(271) -
Career Counselling
(1,060) -
Cloud Computing
(3,446) -
Cyber Security & Ethical Hacking
(147) -
Data Analytics
(1,266) -
Database
(855) -
Data Science
(75) -
DevOps & Agile
(3,575) -
Digital Marketing
(111) -
Events & Trending Topics
(28) -
IoT (Internet of Things)
(387) -
Java
(1,247) -
Kotlin
(8) -
Linux Administration
(389) -
Machine Learning
(337) -
MicroStrategy
(6) -
PMP
(423) -
Power BI
(516) -
Python
(3,188) -
RPA
(650) -
SalesForce
(92) -
Selenium
(1,569) -
Software Testing
(56) -
Tableau
(608) -
Talend
(73) -
TypeSript
(124) -
Web Development
(3,002) -
Ask us Anything!
(66) -
Others
(1,929) -
Mobile Development
(263)
Subscribe to our Newsletter, and get personalized recommendations.
Already have an account? Sign in.
On Ubuntu Bionic ARM64 on my Raspberry Pi 4b I get the following error:
ubuntu@ubuntu:~$ sudo docker run hello-world
docker: Error response from daemon: error creating aufs mount to /var/lib/docker/aufs/mnt/ae6dd4e40cc4ee953f997a4f19f8056efe077eba1603cca2cfb7350c93969edb-init: mount target=/var/lib/docker/aufs/mnt/ae6dd4e40cc4ee953f997a4f19f8056efe077eba1603cca2cfb7350c93969edb-init data=br:/var/lib/docker/aufs/diff/ae6dd4e40cc4ee953f997a4f19f8056efe077eba1603cca2cfb7350c93969edb-init=rw:/var/lib/docker/aufs/diff/c1d12d7d4632739ca4f5577690e026706470b0e3fb32dfa1544095d23755b1e8=ro+wh,dio,xino=/dev/shm/aufs.xino: invalid argument.
I’m running docker-ce. What can I do to fix this?
asked Oct 17, 2019 at 18:39
This was caused by Berryboot which uses AUFS itself apparently and you cannot have AUFS on AUFS (this error) nor can you switch to the alternative overlay2 storage driver.
I now switched to using devicemapper as the storage driver and that seems to work. In the end I hope to be able to boot directly from USB and just be able to use overlay2 then but for now this works.
answered Oct 17, 2019 at 19:22
Я получаю эту ошибку, когда пытаюсь создать файл докеров
error creating aufs mount to /var/lib/docker/aufs/mnt
/6c1b42ce1a98b1c0f2d2a7f17c196221445f1054566065d4c607e4f1b99930eb-init:
invalid argument
Что это значит? Как это исправить?
Ответ 1
После удаления /var/lib/docker/aufs у меня возникли некоторые неудовлетворенные ошибки, которые очистили пару дополнительных шагов.
Чтобы добавить к @benwalther answer, так как мне не хватает репутации для комментариев:
# Cleaning up through docker avoids these errors
# ERROR: Service 'master' failed to build:
# open /var/lib/docker/aufs/layers/<container_id>: no such file or directory
# ERROR: Service 'master' failed to build: failed to register layer:
# open /var/lib/docker/aufs/layers/<container_id>: no such file or directory
docker rm -f $(docker ps -a -q)
docker rmi -f $(docker images -a -q)
# As per @BenWalther answer above
sudo service docker stop
sudo rm -rf /var/lib/docker/aufs
# Removing the linkgraph.db fixed this error:
# Conflict. The name "/jenkins_data_1" is already in use by container <container_id>.
# You have to remove (or rename) that container to be able to reuse that name.
sudo rm -f /var/lib/docker/linkgraph.db
sudo service docker start
Ответ 2
AUFS не может смонтировать файловую систему контейнера docker.
Это либо потому, что: путь уже установлен, либо есть условие гонки при взаимодействии докеров с AUFS из-за большого количества существующих томов.
Чтобы решить эту проблему, попробуйте выполнить следующее:
-
перезапустите службу докеров или демон и повторите попытку.
-
проверьте
mountдля aufs, установленных на любых путях под/var/lib/docker/aufs/. Если найдено, остановите докер, затемumountих (нужно sudo).пример:
mount
none on /var/lib/docker/aufs/mnt/55639da9aa959e88765899ac9dc200ccdf363b2f09ea933370cf4f96051b22b9 type aufs (rw,relatime,si=5abf628bd5735419,dio,dirperm1)
то sudo umount /var/lib/docker/aufs/mnt/55639da9aa959e88765899ac9dc200ccdf363b2f09ea933370cf4f96051b22b9
- Если это не работает, остановите докер, затем
sudo rm -rf /var/lib/docker/aufs. Вы потеряете все существующие остановленные контейнеры и все изображения. Но это почти гарантировано для решения проблемы.
Ответ 3
Я удалил /var/lib/docker/aufs/diff и получил ту же проблему:
ошибка создания aufs mount в /var/lib/docker/aufs/mnt/blah -blah-init: недопустимый аргумент
Он решил запустить следующие команды:
docker stop $(docker ps -a -q);
docker rm $(docker ps -a -q);
docker rmi -f $(docker images -a -q)
Ответ 4
К сожалению, в моей системе я не мог решить это с помощью вышеупомянутых ответов. Администрация докера продолжала запоминать определенный файл в слое aufs, которого он больше не мог достичь. Другие решения тоже не работали. Поэтому, если это вариант для вас, вы можете попробовать следующее исправление: удалить/очистить docker и docker-engine:
apt-get purge docker docker-engine
Затем убедитесь, что все из /var/lib/docker удалено.
rm -rf /var/lib/docker
После этого снова установите докеры.
Ответ 5
В окнах после перезагрузки проблема док-машины решена для меня.
остановка докерной машины.
запуск докерной машины
docker-compose up































