Mssql-docker: docker with volume on local drive

Created on 22 Feb 2018  路  12Comments  路  Source: microsoft/mssql-docker

configuration:
windows 10 pro 64bits
docker 17.12.0-ce-win47 (15139)
command:

docker run 
    -e "ACCEPT_EULA=Y" 
    -e "MSSQL_SA_PASSWORD=****" 
    -p 1401:1433 
    --name mssql1 
    -v /d/docker/volumes/mssql1:/var/opt/mssql 
    -d microsoft/mssql-server-linux:2017-latest

the container crashes and in d:\docker\volumes\mssql1\log
I find an errorlog containing:

...
2018-02-22 17:00:12.97 spid6s      Database 'master' running the upgrade step from version 862 to version 863.
2018-02-22 17:00:13.01 spid6s      Database 'master' running the upgrade step from version 863 to version 864.
2018-02-22 17:00:13.05 spid6s      Error: 17053, Severity: 16, State: 1.
2018-02-22 17:00:13.05 spid6s      /var/opt/mssql/data/mastlog.ldf: Operating system error 31(A device attached to the system is not functioning.) encountered.
2018-02-22 17:00:14.07 spid6s      Error: 928, Severity: 20, State: 1.
2018-02-22 17:00:14.07 spid6s      During upgrade, database raised exception 9002, severity 17, state 0, address 0000000484D0157E. Use the exception number to determine the cause.
2018-02-22 17:00:14.09 spid6s      Error: 9002, Severity: 17, State: 0.
2018-02-22 17:00:14.09 spid6s      The transaction log for database 'master' is full due to 'NOTHING'.

all runs fine if:

  • I do not use a -v option
  • I use *v with a docker volume
LCOW mssql-server-linux

Most helpful comment

Same issue. The documentation on the Microsoft site mentions that mounting host directories is not supported for Docker on Mac , however like tschmit I'm running this on Windows 10.

OS: Windows 10 64bit
Docker build: Version 17.12.0-ce-win47 (15139) and 18.03.0-ce-win59 (16762).
Docker-Compose file:

mssql: image: microsoft/mssql-server-linux:2017-CU4 environment: SA_PASSWORD: "MySuperRandomStrong!Passw0rd!" ACCEPT_EULA: "Y" volumes: - ./data/mssql:/var/opt/mssql ports: - "1433:1433"

All 12 comments

Hello same issue on my side.

With version 17.09.1-ce it's working.

same issue here, using same version on Windows 17.12.0-ce-win47 (15139)

Same issue. The documentation on the Microsoft site mentions that mounting host directories is not supported for Docker on Mac , however like tschmit I'm running this on Windows 10.

OS: Windows 10 64bit
Docker build: Version 17.12.0-ce-win47 (15139) and 18.03.0-ce-win59 (16762).
Docker-Compose file:

mssql: image: microsoft/mssql-server-linux:2017-CU4 environment: SA_PASSWORD: "MySuperRandomStrong!Passw0rd!" ACCEPT_EULA: "Y" volumes: - ./data/mssql:/var/opt/mssql ports: - "1433:1433"

What version of Windows 10 are you using? Docker info will return all the info including the kernel version. This is specifically important in this case as if your are on insider builds we have now moved to a new volume mounting driver (improves reliability and app compat) and I want to see if this issue is specific to the old or new driver.

example of docker info string:
Kernel Version: 10.0 17128 (17128.1.amd64fre.rs4_release.180318-1310)

Kernel Version: 4.9.87-linuxkit-aufs
Edit - To be clear, I'm running Docker on Windows 10, but docker itself is running in Linux containers mode.

@MarcusChamberlain - have you tried LCOW mode by chance? Linux containers on Windows
it's still in the edge channel with experimental support and I know there are other issues/gaps (i.e. CPU/Memory support is not lit up yet for example) but it would be interesting to know if this issue is addressed there or not.

@twright-msft, this is Linux container on Windows issue can you re-tag?

@taylorb-microsoft Created a new 'LCOW' tag and retagged. We'll try to use LCOW to track all issues related to LCOW issues (LCOW mode or Docker for Windows). If we need to get more granular than that in the future we can create more tags.

@taylorb-microsoft : I tried LCOW mode but unfortunately I hit the "This program requires a machine with at least 2000 megabytes of memory" issue. I think until that gets resolved I can't test if LCOW fixes the volume issue.

Same issue experienced.
Docker info:

Server Version: 18.03.1-ce                                                                       
Kernel Version: 4.9.87-linuxkit-aufs                                           
Operating System: Docker for Windows                                           
OSType: linux                                                                  
Architecture: x86_64                                                           
CPUs: 2                                                                        
Total Memory: 1.934GiB                           

Docker version:

Client:
 Version:      18.03.1-ce
 API version:  1.37
 Go version:   go1.9.5
 Git commit:   9ee9f40
 Built:        Thu Apr 26 07:12:48 2018
 OS/Arch:      windows/amd64
 Experimental: false
 Orchestrator: swarm

Server:
 Engine:
  Version:      18.03.1-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.5
  Git commit:   9ee9f40
  Built:        Thu Apr 26 07:22:38 2018
  OS/Arch:      linux/amd64
  Experimental: true

hello

I am using docker on windows 2016 (Azure VM). I am able mount volume of mssql container but is not getting sync between share volume.

Could some can help on that..

   "Name": "windowsfilter"

},
"Mounts": [
{
"Type": "volume",
"Name": "dbdata",
"Source": "C:\ProgramData\docker\volumes\dbdata\_data",
"Destination": "c:\program file\microsoft sql server\mssql14.mssqlserver\mssql\datas",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}

@MarcusChamberlain

I made a docker image that works around this memory (limitation) policy:
https://github.com/justin2004/mssql_server_tiny

Was this page helpful?
0 / 5 - 0 ratings