containers / docker-lvm-plugin

Docker volume plugin for LVM volumes
GNU Lesser General Public License v3.0
155 stars 64 forks source link

Thin by default #97

Open virtualdxs opened 3 years ago

virtualdxs commented 3 years ago

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.

shishir-a412ed commented 3 years ago

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

virtualdxs commented 3 years ago

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 commented 3 years ago

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.

shishir-a412ed commented 3 years ago

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