moby: Docker run freezes host os if images are on ntfs filesystem

Output of docker version:

Client:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 22:00:36 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 22:00:36 2016
 OS/Arch:      linux/amd64

Output of docker info:

Containers: 7
 Running: 0
 Paused: 0
 Stopped: 7
Images: 43
Server Version: 1.12.0
Storage Driver: aufs
 Root Dir: /home/nikhil/DockerImages/aufs
 Backing Filesystem: extfs
 Dirs: 106
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: host bridge null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor
Kernel Version: 3.19.0-32-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 7.712 GiB
Name: WORK-MACHINE
ID: ##########################
Docker Root Dir: /home/nikhil/DockerImages
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
 127.0.0.0/8

Additional environment details (AWS, VirtualBox, physical, etc.): N.A.

Steps to reproduce the issue:

  1. On a Linux (Mint 17.3) machine.
  2. Edit /etc/default/docker and change DOCKER_OPTS, adding -g to point to a directory in a partition with NTFS filesystem. Ex.: DOCKER_OPTS="-g /media/Data/DockerImages"
  3. Restart docker daemon
  4. execute docker run ubuntu

Describe the results you received: Host operating system freezes, no keypresses are registered and hard reset is the only way out.

Describe the results you expected: Should either throw error saying the filesystem cannot be used, or should work.

Additional information you deem important (e.g. issue happens only occasionally): Moving the directory to an ext4 filesystem works fine; which currently is the path visible in the info above. /media/Data in the example above is not a removable drive.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

@cpuguy83 Well, not intentionally, but when you dual boot, your largest drive tends to be a partition which can be used in both OSs and OS partitions tend to be small. NTFS is the natural choice for this drive, among FAT32, NTFS and ext4. And when you keep on downloading images, eventually you need to move them out of OS partition and you encounter this issue! 😄

@GurvanKervern i managed to get my docker data on an NTFS partition by using the Device Mapper storage driver. Instead of placing this:

{
  "data-root": "/path/to/dockerdata"
}

in /etc/docker/daemon.json, use:

{
    "graph": "/path/to/dockerdata",
    "storage-driver": "devicemapper"
}

It seems to work but now i get a warning that device mapper is deprecated. If anyone knows a better way, I’d love to hear about it…

Confirm the bug of aufs upon ntfs on Ubuntu 16.04. Moved /var/lib/docker/ to my big ntfs partition and had that system-wide freezes. Poor ubuntu even couldn’t restart in a clean way: hanged on stopping container engine and unmounting aufs.

Switching to devicemapper solved the issue. That’s just a workaround, however.

Docker version:

Client:
 Version:      17.06.0-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:23:31 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.06.0-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:19:04 2017
 OS/Arch:      linux/amd64
 Experimental: false

Docker info:

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 7
Server Version: 17.06.0-ce
Storage Driver: devicemapper
 Pool Name: docker-8:17-553498-pool
 Pool Blocksize: 65.54kB
 Base Device Size: 10.74GB
 Backing Filesystem: ext4
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 2.408GB
 Data Space Total: 107.4GB
 Data Space Available: 105GB
 Metadata Space Used: 2.552MB
 Metadata Space Total: 2.147GB
 Metadata Space Available: 2.145GB
 Thin Pool Minimum Free Space: 10.74GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /media/theoden/dataz/docker/devicemapper/devicemapper/data
 Metadata loop file: /media/theoden/dataz/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.110 (2015-10-30)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfb82a876ecc11b5ca0977d1733adbe58599088a
runc version: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-83-generic
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 7.748GiB
Name: ThunderBluff
ID: HBZL:6MYN:WIHS:HJNE:WSLB:4X2H:AHSI:72VV:NMTY:O7UT:F3G2:5NHA
Docker Root Dir: /media/theoden/dataz/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
         Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
WARNING: No swap limit support

Confirmed that fuse-overlayfs works on NTFS.