gluster / gluster-containers

Dockerfiles (CentOS, Fedora, Red Hat) for GlusterFS
https://github.com/gluster/gluster-containers/pkgs/container/gluster-containers
223 stars 135 forks source link

Gluster pods should be able to load certain lvm/device-mapper modules #75

Open nixpanic opened 6 years ago

nixpanic commented 6 years ago

There is no guarantee that the dm_thin_pool, dm_mirror and dm_snapshot kernel modules are loaded. Creating volumes with Heketi enabled thin-provisioning for the bricks. This will fail if the device-mapper/lvm modules are not available.

It seems most reasonable to let the Gluster pod automatically load the required modules. The automatic loading of modules is already standard practice for non-containerized environments. In order to make this happen in the most cases, it will be needed to bind-mount /lib/modules from the host into the pod. Without this bind-mount, the pod will not be able to run modprobe with the right .ko files.

See-also: gluster/gluster-kubernetes#440

humblec commented 6 years ago

we can place that loading in setup/start up script

nixpanic commented 6 years ago

It should not be needed to load the modules in advance. They should get loaded automatically when needed, by the LVM stack that is called from Gluster upon snapshot commands.

The modules may not exist at all, in case they are compiled into the kernel. Future LVM changes may require different modules. Having it done automatically will prevent many potential issues.