-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Docker daemon "-g" start up option to point to LVM-direct mount #249
Comments
docker-storage-setup is the one which is setting up the storage for docker. So it should be the one communicating location of images/containers to docker and not vice-a-versa. So while we do hardcode the location, what's the use case for changing it. I am aware of "-g" option of docker, but who uses it and why and in what context. |
@rhvgoyal : some folks mounted alots of host volumes to container, esp legacy softwares. So usually they want to specify the "-g" option for 1 logical volume(non-thin) and then another volume(thin) dedicated to devicemapper. |
Sorry I don't understand. Can you explain it in little bit more detail. |
@rhvgoyal : Assume that I have 3 devices : "/dev/sda", "/dev/sdb","/dev/sdc"
Hope that's clearer. |
So you are taking care of creating a filesystem on /dev/sdb and mounting it on /mnt/docker? An easy workaround is to mount /dev/sdb at /var/lib/docker/ instead? How about that? container-storage-setup does not know what's the root location docker wants to use. May be we can introduce an option say I did not feel strongly introducing that option as it is little corner case and it is easily fixable by mounting disk on /var/lib/docker instead. |
I may not want to mount at "/var/lib/docker" for some reasons. |
you may be pushing the tooling too far. Most people will be satisfied with mounting on /var/lib/docker trying to figure out just adds a ton of complexity for an incredibly small subset of the users, who most like could figure out how to configure the system themselves. |
How about using new options which allow setting up rootfs for container run time. Add your disk /dev/vdb and /dev/vdc to a single volume say docker-vg. And specify following. I think this will do what you are looking for. Create a separate volume for docker rootfs and mount it at the path you are looking for. |
@rhvgoyal : So CONTAINER_ROOT_LV_NAME="docker-root-lv" will used to carve out a LV from the docker_vg for the container rootfs besides the 2 DM "thin " LVs pool data and metadata??. |
@bklau, yes. container-root-lv will be carved out and mounted at IOW, container-storage-setup has been enhanced to handle this use case where a user does not want docker's metadata storage from root file system but from a separate disk. |
@rhvgoyal Thanks. Then that will work! :) |
@rhvgoyal : How can i install this newer package?. |
Package name now is container-storage-setup. what distribution and repository you are using? On fedora 25, I imagine this might be available. |
@rhvgoyal : I'm using AWS Linux AMI. |
@bklau I think you will have to talk to amazon for packaging new container-storage-setup in image for that. I can't do anything about that. |
@bklau i've packaged and hosted both
@rhatdan I mirror the git repo and run automated builds to this package hosting service whenever you run new releases. All the image metadata and stuff has your copyrights and licenses in there, I just have my own contact information in the maintainer metadata fields. |
For future visitors who like me are wondering what that |
Currently, docker-storage-setup assumes that the default location of the "root" filesystem for Docker images/containers to be at "/var/lib/docker". What if I want it to be at another place via "-g" option of Docker daemon to point to say, "/mnt/something" or "/var/something"?
The text was updated successfully, but these errors were encountered: