Docker Community Forums

Share and learn in the Docker community.

Mounting docker external volume directory on a host lvm partition, will this work?

docker

(Sina Owolabi) #1

Hi All

I am thinking of mounting each external volume I create as an lvm partition on Linux.
By this I mean I run
’docker volume create avolume’ and then before I use it, I create an lvm partition called ‘lv_avolume’ and then run
’mount /dev/vg_vgname/lv_avolume /var/lib/docker/avolume '
This is for applications such as mysql for instance, so that I can grow the volume by growing the lvm partition at will.

Will this work without problems, please?