English
« Back to projectatomic.io
Ask Your Question
0

How to make 3TB data volume container

asked 2016-04-04 09:31:47 +0000

Yenda gravatar image

I need to run shared folder which simply mounted to several containers. The good way is to make docker data volume (docker create -v ....) but there is a restriction 4GB of space. I've not been able to find how to extend this space. When I run a common container, there is 100GB space restriction. I'm theoretically able to grow it by dm.basesize option in docker daemon, but it doesn't work. When I insert --storage-opt dm.basesize=3000G (or 3T), it fails and docker daemon ignores it. The only way is to mount a host folder in docker run command, but there is many issues with this solution. For example if I add an user in container, he isn't available in host system (of course!) and even worse if I add an user in host system after, he will receive the same UID and takes ownership of folders!

The best solution would be a docker data volume with 3TB of storage space.

Any idea?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2016-04-07 20:26:33 +0000

miabbott gravatar image

This isn't an exact answer to your question, but I did confirm that you are able to change the dm.basesize to 3TB.

I did the following using Fedora 23 Atomic Host, version 23.98. This version has docker-1.9.1-9.gitee06d03

First, you'll have to stop the docker daemon and clean out your existing /var/lib/docker. Additionally, I removed my docker-pool LV.

# systemctl stop docker
# rm -rf /var/lib/docker && lvremove atomicos/docker-pool                                                                                                                                                 
Do you really want to remove active logical volume docker-pool? [y/n]: y
  Logical volume "docker-pool" successfully removed

Then I re-ran docker-storage-setup to re-create the docker-pool LV and edited /etc/sysconfig/docker-storage to change the value of dm.basesize.

# systemctl start docker-storage-setup
# cat /etc/sysconfig/docker-storage
DOCKER_STORAGE_OPTIONS="--storage-driver devicemapper --storage-opt dm.fs=xfs --storage-opt dm.thinpooldev=/dev/mapper/atomicos-docker--pool --storage-opt dm.use_deferred_removal=true --storage-opt dm.use_deferred_deletion=true --storage-opt dm.basesize=3000G"

With the new dm.basesize, I started the docker daemon again and inspected docker info

# systemctl start docker
# systemctl status docker -l
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/docker.service.d
           └─flannel.conf
   Active: active (running) since Thu 2016-04-07 19:56:57 UTC; 7s ago
     Docs: http://docs.docker.com
 Main PID: 1958 (sh)
   CGroup: /system.slice/docker.service
           ├─1958 /bin/sh -c /usr/bin/docker daemon            $OPTIONS            $DOCKER_STORAGE_OPTIONS            $DOCKER_NETWORK_OPTIONS            $INSECURE_REGISTRY            2>&1 | /usr/bin/forward-jour
nald -tag docker
           ├─1960 /usr/bin/docker daemon --selinux-enabled --log-driver=journald --storage-driver devicemapper --storage-opt dm.fs=xfs --storage-opt dm.thinpooldev=/dev/mapper/atomicos-docker--pool --storage-opt
 dm.use_deferred_removal=true --storage-opt dm.use_deferred_deletion=true --storage-opt dm.basesize=3000G
           └─1961 /usr/bin/forward-journald -tag docker

Apr 07 19:56:51 rhel-atomic-7.2-test forward-journal[1961]: Forwarding stdin to journald using Priority Informational and tag docker
Apr 07 19:56:57 rhel-atomic-7.2-test forward-journal[1961]: time="2016-04-07T19:56:57.311603094Z" level=info msg="Firewalld running: false"
Apr 07 19:56:57 rhel-atomic-7.2-test forward-journal[1961]: time="2016-04-07T19:56:57.343391622Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.1/16. Daemon option --bip can be
 used to set a preferred IP address"
Apr 07 19:56:57 rhel-atomic-7.2-test forward-journal[1961]: time="2016-04-07T19:56:57.437442639Z" level=info msg="Loading containers: start."
Apr 07 19:56:57 rhel-atomic-7.2-test forward-journal[1961]: 
Apr 07 19:56:57 rhel-atomic-7.2-test forward-journal[1961]: time="2016-04-07T19:56:57.437856049Z" level=info msg="Loading containers: done."
Apr 07 19:56:57 rhel-atomic-7.2-test forward-journal[1961]: time="2016-04-07T19:56:57.438531985Z" level=info msg="Daemon has completed initialization"
Apr 07 19:56:57 rhel-atomic-7.2-test forward-journal[1961]: time="2016-04-07T19:56:57.438553747Z" level=info msg="Docker daemon" commit="ee06d03/1.9.1" execdriver=native-0.2 graphdriver=devicemapper version=1.9.
1
Apr 07 19:56:57 rhel-atomic-7.2-test forward-journal[1961]: time="2016-04-07T19:56:57.442793190Z" level=info msg="API listen on /var/run/docker.sock"
Apr 07 19:56:57 rhel-atomic-7.2-test systemd[1 ...
(more)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Follow
1 follower

Stats

Asked: 2016-04-04 09:31:47 +0000

Seen: 251 times

Last updated: Apr 07 '16

Related questions