[lxc-devel] lxc.device instead of lxc-device?

Harald Dunkel harald.dunkel at aixigo.de
Fri Oct 16 13:39:10 UTC 2015


Hi folks,

would it be possible to have an option "lxc.device" in
the config file, e.g.

	lxc.autodev = 1
	lxc.device = /dev/vg00/lv01
	lxc.device = /dev/vg00/lv02

It should make the block devices available to the client,
similar to the lxc-device script, but before init and the
services have been started.

All descriptions and howtos I found on google on this
topic seem to ignore that the lxc-device script might be
run too late (container services are already up). The
block device numbers given with lxc.cgroup.devices.allow
might be invalid after the next hardware reboot, making
the config file a risk for others.

I found lxc.hook.pre-start, of course. I could live with
a hook as a painful makeshift, but If I got this right it
appears to be run *before* the container's /dev directory
is setup.


Just a suggestion, of course. Every helpful feedback is
welcome.

Regards
Harri


More information about the lxc-devel mailing list