Open zxln007 opened 1 year ago
From the diag, there are some cases where the mount is failing:
[2023-04-11T11:51:26.614977600Z][dockerd][I] time="2023-04-11T11:51:26.614278300Z" level=error msg="Handler for POST /v1.41/containers/257ba5c143acc5821718fb23728addf0bc4dc8775fea0bef3e4fc5bf58556575/start returned error: error while creating mount source path '/run/desktop/mnt/host/e/backup': mkdir /run/desktop/mnt/host/e: file exists"
That's on E:\
rather than C:\
as shown in your example -- is this different? Is E:\
a removable drive by chance?
One thing to note is that the 2x bind mount syntaxes vary in behavior in Docker:
-v /foo:/bar
will create /foo
on the host if it does not exist
If you convert your volumes into the long syntax in Compose, does the issue go away? That will help us determine if there is an underlying race issue in Compose/Engine.
From the diag, there are some cases where the mount is failing:
[2023-04-11T11:51:26.614977600Z][dockerd][I] time="2023-04-11T11:51:26.614278300Z" level=error msg="Handler for POST /v1.41/containers/257ba5c143acc5821718fb23728addf0bc4dc8775fea0bef3e4fc5bf58556575/start returned error: error while creating mount source path '/run/desktop/mnt/host/e/backup': mkdir /run/desktop/mnt/host/e: file exists"
That's on
E:\
rather thanC:\
as shown in your example -- is this different? IsE:\
a removable drive by chance?One thing to note is that the 2x bind mount syntaxes vary in behavior in Docker:
- short form (that you're using), e.g.
-v /foo:/bar
will create/foo
on the host if it does not exist- long form will NOT create host path
- type: bind source: /foo target: /bar
If you convert your volumes into the long syntax in Compose, does the issue go away? That will help us determine if there is an underlying race issue in Compose/Engine.
Sorry ! the compose file i copy wrong,
it should be /run/desktop/mnt/host/e/zxln007/backup:/backup
Yes you are right ,E:/ is a USB Disk.
i will try your comment , thank you very much @milas
I give up to mount the usb disk , i tried to mount the folder on the local disk.
but i still encountered the same problem. Mount failed !
after try many times , I found a law!
when i change the folder to a new folder like this:
it works! the folder mounted successfully
when i restart the container , it mount failed again
it seems a new path could be mounted , and after restart container, it lose efficacy
why? thanks for your help @milas
Actual behavior
i mount 5 folder in a container , 4 of them mounted successfully ,
but only one cannot mount . not always , about 10 percent .
a part of docker-compose.yml
Expected behavior
mount all folder successfully
Information
Output of
& "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check
Steps to reproduce the behavior