I'm looking to install RADOS osds in privileged lxc containers and I'm having trouble setting up the block devices.

I need /dev/sdb, etc. to be connected at container start, before the RADOS osd stuff spins up. I have everything like permissions and app armor set up correctly since I can take a new container, use mknod to create the dev entry, setup the RADOS osd, and everything appears to work. This obviously own't survive a container restart, however.

Note that I can't use an fstab to mount a file system. RADOS's fancy new storage requires block devices. I don't care about security since this is just for a RADOS sandbox.

I've been digging around in the lxc docs, but I can't seem to find anything. I tried an @reboot cron entry, but that appears to happen too late so the osd is grumpy about not having storage. And it looks like udev doesn't work in containers(?)

How do you set up block device dev entries that persist in lxc containers?

lxc version is 3.0.3. OS is Ubuntu 18.04 LTS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.