Docker Community Forums

Share and learn in the Docker community.

Volume binds issue

(Loulouklm) #1

Expected behavior

I would like to store data of mariadb container in my projet directory ./data
I put a volume in my docker-compose.yml
- ./data:/var/lib/mysql

I expect to have my container work but it failed during creating db while container init.

Actual behavior

When I launch my container without volume, everything works. But if I put a volume it failed. It writes somes files and stopped.

2016-07-01 21:11:28 139973248370624 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2016-07-01 21:11:28 139973248370624 [Note] InnoDB: Database physically writes the file full:
2016-07-01 21:11:28 7f4e0fbf47c0 InnoDB: Error: Write to file ./ibdata1 failed at offset 0.


Windows 10
Latest version of docker beta for Windows
A diagnostic was uploaded with id: 082520B7-F1C0-4761-9A1B-4DB51F78851D/2016-07-01_23-22-24

Steps to reproduce the behavior

My test is realy simple to reproduct. Here is my docker-compose.yml
I put it in => D:\Dev\lbcd_wp

image: wordpress
- ./wp-content/:/var/www/html/wp-content
- db:mysql
- “80:80”

image: mariadb
- ./data:/var/lib/mysql

Launch docker-compose up

If I remove volumes everything is fine. But with my volume it writes some files :

  • directory ./data/mysql (empty)
  • aria_log.00000001 (16 Ko)
  • aria_log_control (1 Ko)
  • ibdata1 (0 ko)

and failed to start container

Error on console is:
2016-07-01 21:26:48 140044960102336 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2016-07-01 21:26:48 140044960102336 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2016-07-01 21:26:48 140044960102336 [Note] InnoDB: Database physically writes the file full: wait…
2016-07-01 21:26:48 7f5ec21977c0 InnoDB: Error: Write to file ./ibdata1 failed at offset 0.
InnoDB: 1048576 bytes should have been written, only 0 were written.
InnoDB: Operating system error number 22.
InnoDB: Check that your OS and file system support files of this size.
InnoDB: Check also that the disk is not full or a disk quota exceeded.
InnoDB: Error number 22 means ‘Invalid argument’.
InnoDB: Some operating system error numbers are described at
2016-07-01 21:26:48 140044960102336 [ERROR] InnoDB: Error in creating ./ibdata1: probably out of disk space

Of course I’m not out of space.
What is realy suprising it that it works without volume binding indicated. So auto binding work.

Thanks for your help

(Loulouklm) #2

Precision: volumes in “WordPress” container seems to works fine.

(Mattroid) #3

I’m having an issue with an IPython container. I’m trying to mount the notebooks folder with flag -v c:\temp:/data

When I get into the container the /data folder is empty.

Below is the relevant logs from the docker host.

ProxyProcess ][Debug ] com.docker.slirp.exe: ARP responding to: who-has
[22:34:58.987][ProxyProcess ][Info ] proxy >> POST /v1.24/containers/create [rewriteBinds]
[22:34:58.992][ProxyProcess ][Info ] Rewrote mount to /C/temp:/data
[22:34:58.998][ProxyProcess ][Info ] proxy >> POST /v1.24/containers/create
[22:34:59.001][ProxyProcess ][Info ] Dial Hyper-V socket e44ab7e5-f743-40b7-bbba-73b6f2d33adb:23a432c2-537a-4291-bcb5-d62504644739
[22:34:59.082][ProxyProcess ][Info ] proxy << POST /v1.24/containers/create
[22:34:59.086][ProxyProcess ][Info ] proxy >> POST /v1.24/containers/d84306587578dc611bc3681da88c4c11a3f6d1705a766a56aac0ac2f15facdb1/attach?stderr=1&stdin=1&stdout=1&stream=1
[22:34:59.091][ProxyProcess ][Info ] Dial Hyper-V socket e44ab7e5-f743-40b7-bbba-73b6f2d33adb:23a432c2-537a-4291-bcb5-d62504644739
[22:34:59.095][ProxyProcess ][Info ] Upgrading to raw stream

(Michael Friis) #4

The outcome of what you’re attempting is that mariadb running in Linux will be writing to a Windows NTFS filesystem mounted over SAMBA/CIFS - that may not work. We’re working on improving the filesystem semantics. In the interim, is there a particular reason you need to map the database files out to the Windows filesystem?

Trying to get Postgres to work on persistent windows mount - two issues
(Loulouklm) #5


Thank you for your answer. My purpose is to store data in a folder that I can backup. If I have to erase and re-build container I lose my data except if I bind a volume to store data.

(Michael Friis) #6

Hm, I think you should be able to achieve a similar effect with volumes:

(Aetherdan) #7

I am having this exact same issue. The reason I need to mount the db on the host, is because I want to be able to push my dev database to my live database via git commits. When the data is stored in the volume, it doesn’t get pushed to the live environment.

(Traup) #8

Same exact issue here. Windows 10 environment. Just started playing with docker and getting a PHP/MariaDB up and running for a CMS. Not a good sign.

(Seandevoy) #9

Still not resolved???