Docker Community Forums

Share and learn in the Docker community.

I/O Error with mounted directory


(Alistairwhite) #1

Expected behavior

Able to view, edit and create files in the new data volume

Actual behavior

I get
touch: file3.txt: I/O error
when I run the command: touch file3.txt

Information

  • Running Windows 10 (10.0.10586.0)
  • Docker for windows Version 1.12.0-rc4-beta20 (build: 5579)

This seems to be a problem with the mounting of the drive, I’m able to run the same command in a different location, but when I try to run it in the mounted volume I get an I/O error

Steps to reproduce the behavior

  1. Go to the Docker for Windows settings and select the drive you want to share and apply the changes (providing authentication when asked)
  2. Run: docker run -it -v D:/DockerData:/data alpine sh (change the source dir as required)
  3. Run the command touch file3.txt

(Afischer211) #2

Your steps are working all for me. Do you use credentials with full access-rights to the shared drive?


(Alistairwhite) #3

Hi,

Yes, I’ve tried with my MS account, and with a local user account with full control over that folder/drive.

I am able to ls on the drive and it shows the contents correctly but reading/writing to the drive comes up with the I/O error.

Something that may be of note is that I can run touch on a file that already exists, with the modified and accessed time getting updated.

Is there a log file I can look at to provide more information?


(Alistairwhite) #4

Hi,

I’m now running version 1.12.0-beta21 (build: 5971)

I’ve just tried resetting to factory defaults and tried this again.

Initially the first I/O command I ran worked but any subsequent commands failed. This happened for a few containers, then went back to not working at all again.

So when I try: docker run -it -v D:\DockerData:/data alpine touch /data/file4.txt I get the same I/O error as above

Let me know if there are any log files I can provide to help with this issue


(Alistairwhite) #5

Hi,

Still having this issue. I’ve tried uninstalling and re-installing Docker, I’ve completely uninstalled VirtualBox (was just disabled before), still no luck.

I’m running Windows 10 Pro which was upgraded from Windows 8.1. I’ve also had 2 other people in my office test this and it has worked fine for them so it is definitely something on my machine that’s causing this.

I’ve tried using an ubuntu image as well and get the same error cat: file1.txt: Input/output error

I’m able to list the directories and cd into sub-directories and create new directories but just not view/edit/create any files on the mounted volume.

In case any of this helps

Here is the output from docker run -it --privileged --pid=host debian nsenter -t 1 -m -n mount

tmpfs on / type tmpfs (rw,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nodev,relatime,size=204524k,mode=755)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=247866,mode=755)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib/rc/sh/cgroup-release-agent.sh,name=openrc)
cpuset on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cpu on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
cpuacct on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
blkio on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
memory on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
devices on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
freezer on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
net_cls on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
perf_event on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
net_prio on /sys/fs/cgroup/net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_prio)
hugetlb on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
pids on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
/dev/sda2 on /var type ext4 (rw,relatime,data=ordered)
db on /Database type 9p (rw,relatime,sync,dirsync,trans=fd,dfltuid=1001,dfltgid=50,version=9p2000,rfdno=5,wfdno=5)
/port on /port type 9p (rw,relatime,sync,dirsync,trans=fd,dfltuid=1001,dfltgid=50,version=9p2000,rfdno=5,wfdno=5)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
/dev/sda2 on /var/lib/docker/aufs type ext4 (rw,relatime,data=ordered)
//10.0.75.1/C on /C type cifs (rw,relatime,vers=1.0,cache=strict,username=alistair.white@cloudgine.com,domain=ALISTAIR-WS,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.75.1,file_mode=0755,dir_mode=0755,iocharset=utf8,nounix,serverino,mapposix,noperm,rsize=61440,wsize=65536,actimeo=1)
//10.0.75.1/C on /c type cifs (rw,relatime,vers=1.0,cache=strict,username=alistair.white@cloudgine.com,domain=ALISTAIR-WS,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.75.1,file_mode=0755,dir_mode=0755,iocharset=utf8,nounix,serverino,mapposix,noperm,rsize=61440,wsize=65536,actimeo=1)
//10.0.75.1/D on /D type cifs (rw,relatime,vers=1.0,cache=strict,username=alistair.white@cloudgine.com,domain=ALISTAIR-WS,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.75.1,file_mode=0755,dir_mode=0755,iocharset=utf8,nounix,serverino,mapposix,noperm,rsize=61440,wsize=65536,actimeo=1)
//10.0.75.1/D on /d type cifs (rw,relatime,vers=1.0,cache=strict,username=alistair.white@cloudgine.com,domain=ALISTAIR-WS,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.75.1,file_mode=0755,dir_mode=0755,iocharset=utf8,nounix,serverino,mapposix,noperm,rsize=61440,wsize=65536,actimeo=1)
none on /var/lib/docker/aufs/mnt/a48130d092e2b3082d1d21f40f211fb8b6cf4fd3bc307796e73ca4883cd827fb type aufs (rw,relatime,si=97f256d16d336db3,dio,dirperm1)
shm on /var/lib/docker/containers/58528a4885145c0bd7f5ea3ed2fc660c6ec23d4e4fe46652eb4ce90c449dd03b/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
nsfs on /run/docker/netns/aca587adb2c4 type nsfs (rw)
none on /var/lib/docker/aufs/mnt/d4d831445af24b2338af5913efb970c24906eb524d3af8e630931e28042b98a3 type aufs (rw,relatime,si=97f256d14ed16db3,dio,dirperm1)
shm on /var/lib/docker/containers/309843cd93aa896c57fad5fcab80f66a1337fd15e48e5c4ba6df32e282169d7c/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
nsfs on /run/docker/netns/371c58b365d1 type nsfs (rw)

And the output from docker run -it --privileged --pid=host debian nsenter -t 1 -m -n tail -50 /var/log/messages

Aug 10 11:58:58 moby user.info KVP: umount: /V and /v
Aug 10 11:58:58 moby user.err KVP: umount: error: 2 No such file or directory
Aug 10 11:58:58 moby user.info KVP: umount: /Y and /y
Aug 10 11:58:58 moby user.err KVP: umount: error: 2 No such file or directory
Aug 10 11:59:08 moby kern.info kernel: nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
Aug 10 11:59:31 moby kern.info kernel: hv_balloon: Received INFO_TYPE_MAX_PAGE_CNT
Aug 10 11:59:31 moby kern.info kernel: hv_balloon: Data Size is 8
Aug 10 12:00:07 moby kern.notice kernel: random: nonblocking pool is initialized
Aug 10 12:01:03 moby daemon.info vsudd[1231]: Connection 2 to: 23a432c2-537a-4291-bcb5-d62504644739 from: 00000000-0000-0000-0000-000000000000:e0a29925-5eed-11e6-8273-086266a404e7
Aug 10 12:01:03 moby daemon.info vsudd[1231]: 2 error copying from vsock to docker: read hvsock:8: bad file descriptor
Aug 10 12:01:03 moby daemon.info vsudd[1231]: 2 error CloseRead on vsock: HvSocket has been closed for read
Aug 10 12:01:03 moby daemon.info vsudd[1231]: 2 error CloseWrite on vsock: HvSocket has been closed for write
Aug 10 12:01:03 moby daemon.info vsudd[1231]: 2 Done. read: 1559 written: 189
Aug 10 12:01:03 moby daemon.info vsudd[1231]: Connection 3 to: 23a432c2-537a-4291-bcb5-d62504644739 from: 00000000-0000-0000-0000-000000000000:e0a29926-5eed-11e6-8273-086266a404e7
Aug 10 12:01:03 moby kern.warn kernel: aufs au_opts_verify:1597:dockerd[1636]: dirperm1 breaks the protection by the permission bits on the lower branch
Aug 10 12:01:03 moby daemon.info vsudd[1231]: 3 error copying from vsock to docker: read hvsock:7: bad file descriptor
Aug 10 12:01:03 moby daemon.info vsudd[1231]: 3 error CloseRead on vsock: HvSocket has been closed for read
Aug 10 12:01:03 moby daemon.info vsudd[1231]: 3 error CloseWrite on vsock: HvSocket has been closed for write
Aug 10 12:01:03 moby daemon.info vsudd[1231]: 3 Done. read: 86 written: 1969
Aug 10 12:01:03 moby daemon.info vsudd[1231]: Connection 4 to: 23a432c2-537a-4291-bcb5-d62504644739 from: 00000000-0000-0000-0000-000000000000:e0a29928-5eed-11e6-8273-086266a404e7
Aug 10 12:01:16 moby daemon.info vsudd[1231]: 4 error copying from vsock to docker: read hvsock:8: bad file descriptor
Aug 10 12:01:16 moby daemon.info vsudd[1231]: 4 error CloseRead on vsock: HvSocket has been closed for read
Aug 10 12:01:16 moby daemon.info vsudd[1231]: 4 error CloseWrite on vsock: HvSocket has been closed for write
Aug 10 12:01:16 moby daemon.info vsudd[1231]: 4 Done. read: 320 written: 38889
Aug 10 12:01:16 moby daemon.info vsudd[1231]: Connection 5 to: 23a432c2-537a-4291-bcb5-d62504644739 from: 00000000-0000-0000-0000-000000000000:e0a29936-5eed-11e6-8273-086266a404e7
Aug 10 12:01:17 moby daemon.info vsudd[1231]: 5 error copying from vsock to docker: read hvsock:7: bad file descriptor
Aug 10 12:01:17 moby daemon.info vsudd[1231]: 5 error CloseRead on vsock: HvSocket has been closed for read
Aug 10 12:01:17 moby daemon.info vsudd[1231]: 5 error CloseWrite on vsock: HvSocket has been closed for write
Aug 10 12:01:17 moby daemon.info vsudd[1231]: 5 Done. read: 1559 written: 234
Aug 10 12:01:17 moby daemon.info vsudd[1231]: Connection 6 to: 23a432c2-537a-4291-bcb5-d62504644739 from: 00000000-0000-0000-0000-000000000000:e0a29937-5eed-11e6-8273-086266a404e7
Aug 10 12:01:17 moby daemon.info vsudd[1231]: Connection 7 to: 23a432c2-537a-4291-bcb5-d62504644739 from: 00000000-0000-0000-0000-000000000000:e0a29938-5eed-11e6-8273-086266a404e7
Aug 10 12:01:17 moby kern.info kernel: device veth8d8a5b2 entered promiscuous mode
Aug 10 12:01:17 moby kern.info kernel: IPv6: ADDRCONF(NETDEV_UP): veth8d8a5b2: link is not ready
Aug 10 12:01:17 moby kern.info kernel: IPVS: Creating netns size=2096 id=1
Aug 10 12:01:17 moby kern.warn kernel: cgroup: docker-runc (1924) created nested cgroup for controller “memory” which has incomplete hierarchy support. Nested cgroups may change behavior in the future.
Aug 10 12:01:17 moby kern.warn kernel: cgroup: “memory” requires setting use_hierarchy to 1 on the root
Aug 10 12:01:17 moby kern.info kernel: eth0: renamed from veth0733932
Aug 10 12:01:17 moby kern.info kernel: IPv6: ADDRCONF(NETDEV_CHANGE): veth8d8a5b2: link becomes ready
Aug 10 12:01:17 moby kern.info kernel: docker0: port 1(veth8d8a5b2) entered forwarding state
Aug 10 12:01:17 moby kern.info kernel: docker0: port 1(veth8d8a5b2) entered forwarding state
Aug 10 12:01:17 moby kern.info kernel: IPv6: ADDRCONF(NETDEV_CHANGE): docker0: link becomes ready
Aug 10 12:01:17 moby daemon.info vsudd[1231]: 7 error copying from vsock to docker: read hvsock:7: bad file descriptor
Aug 10 12:01:17 moby daemon.info vsudd[1231]: 7 error CloseRead on vsock: HvSocket has been closed for read
Aug 10 12:01:17 moby daemon.info vsudd[1231]: Connection 8 to: 23a432c2-537a-4291-bcb5-d62504644739 from: 00000000-0000-0000-0000-000000000000:e0a2993a-5eed-11e6-8273-086266a404e7
Aug 10 12:01:17 moby daemon.info vsudd[1231]: 7 error CloseWrite on vsock: HvSocket has been closed for write
Aug 10 12:01:17 moby daemon.info vsudd[1231]: 7 Done. read: 209 written: 95
Aug 10 12:01:17 moby daemon.info vsudd[1231]: 8 error copying from vsock to docker: read hvsock:10: bad file descriptor
Aug 10 12:01:17 moby daemon.info vsudd[1231]: 8 error CloseRead on vsock: HvSocket has been closed for read
Aug 10 12:01:17 moby daemon.info vsudd[1231]: 8 error CloseWrite on vsock: HvSocket has been closed for write
Aug 10 12:01:17 moby daemon.info vsudd[1231]: 8 Done. read: 221 written: 147

I’m at a point where I am thinking about reinstalling windows so any ideas would be greatly appreciated.