Docker Community Forums

Share and learn in the Docker community.

Docker storage setup not found

docker

(Speedflyer) #1

Hello

I have a little bit problem on configuring docker storage.
From what I saw in a trainig I received docker is using loopback which is not a good solution for production use.
The recommanded configuration is dm.thinpooldev storage.

So I create a file docker-storage-setup which contains:

DEVS=/dev/vdb
VG=docker-vg
SETUP_LVM_THIN_POOL=yes 

Then I wanted to run command docker-storage-setup and their I saw that the command is not found…

I am using community edition
Docker version 17.06.2-ce, build cec0b72

My OS is Centos 7 (release 7.3.1611)

Do you maybe know how can it be installed.

I saw here that now it is called container-storage-setup however I cannot find any file related to this package in all my machine. Same for docker-storage-setup

I found this but it does not helped me a lot as people have the same problem or talk about a service but I cannot find such a service.

Do you maybe have an idea?

Thanks a lot in advance


(Pierretim) #2

I think that the red-hat provided utility (docker-storage-setup) is packaged in the rpm delivered by the red-hat/centos distribution. If you installed docker-ce, from the docker repository, then you are on your own. But if you follow the instructions in the documentation you can do what docker-storage-setup without too much pain: there are step by step instructions.

I did also install docker-ce because I wanted the most recent version and I missed this great utility from red-hat, but I did follow the doc and there were no problem. It gives you a bit of insight also

Rgds, Pierre


(Speedflyer) #3

Thanks a lot Pierre for your answer.
Yes actually I was able to set it up with the documentation.
It was really well explained.


(Niradnik) #4

Hey I face the same issue I wanted to know what did you follow I would like to change the /var/lib/docker location and switch to overlay instead of devicemapper and only found solution using docker-storage-setup .

Have a great day !


(Speedflyer) #5

I found dock on :


You can maybe find what you search close to this


(Cvakiitho) #6

Hello everyone,

I’m following docker docs guide for devicemapper setup,
and I’m getting rather annoying issue, where if you let docker CE setup the lvm and volumegroups, docker daemon is failing with error: volume group “docker” already present on device.

Anyone else experiencing same thing?


(Speedflyer) #7

It means that you already tried to configure a logical volume group for docker and you did not delete it.
Here is a script to configure docker properly and remove everything if needed.
I indicate you the line for cleaning


(Cvakiitho) #8

Thanks,

I know what it means, I just don’t understand why it happens, because it is done on fresh VM, so docker CE does this. …

To be more specific,
I have latest docker ce installed via https://get.docker.com/ on fresh centos 7 machine.
I then have this setup in /etc/docker/daemon.json:

{
  "storage-driver": "devicemapper",
  "storage-opts": [
    "dm.directlvm_device=/dev/sdb",
    "dm.basesize=5G",
    "dm.thinp_percent=95",
    "dm.thinp_metapercent=1",
    "dm.thinp_autoextend_threshold=80",
    "dm.thinp_autoextend_percent=20",
    "dm.directlvm_device_force=true"
  ]
}

and /usr/bin/dockerd returns Error starting daemon: error initializing graphdriver: /dev/sdb is already part of a volume group "docker": must remove this device from any volume group or provide a different device


(Speedflyer) #9

Try to stop your deamon, remove the vg and restart your deamon.
In fact this will force the création of your vg. So if it exists it will crash


(Develroo) #10

I am having the same issue.

Error starting daemon: error initializing graphdriver: /dev/zd0 is already part of a volume group "docker": must remove this device from any volume group or provide a different device

Trouble is there is already data on the volume group created by docker? So how can you remove the volume group if that is the data you want ?


(Poitschkka01) #11

Ran into the same issue while testing.
I created a script to delete the volume:

#!/bin/sh

sudo pvdisplay
sudo lvremove -y docker/thinpool
sudo vgremove docker
sudo pvdisplay