docker-lvm-plugin icon indicating copy to clipboard operation
docker-lvm-plugin copied to clipboard

Thin by default

Open virtualdxs opened this issue 4 years ago • 4 comments

Would it be possible to make it so that volumes are created as part of a thin pool by default? I was hoping for a thinpool option in /etc/docker/docker-lvm-plugin, but I see no such option.

virtualdxs avatar Dec 14 '20 19:12 virtualdxs

@virtualdxs How will the user create regular volumes in that case?

shishir-a412ed avatar Dec 14 '20 19:12 shishir-a412ed

Explicitly specifying the VG would be my suggestion, i.e.:

docker volume create -d lvm -o size=10G --name test_thin # Create a thin volume (assuming configuration specifies a thin pool)
docker volume create -d lvm -o size=10G -o vg=vg0 --name test_thick # Create a thick volume (regardless of configuration)

virtualdxs avatar Dec 14 '20 21:12 virtualdxs

Just to clarify: I'm not asking for the out-of-the-box behavior to be "use a thin pool", I'm asking that I be able to configure my instance such that unless I specify otherwise, docker volumes are created as thin LVs.

virtualdxs avatar Dec 14 '20 23:12 virtualdxs

@virtualdxs Yes, this should be okay. Feel free to open a PR.

shishir-a412ed avatar Jan 04 '21 19:01 shishir-a412ed