I have used Buildroot to create a system that runs in RAM on my ARMv5 Kirkwood SoC -based NAS-box. I use BusyBox as my init system, and /dev management is done using devtmpfs only. I've selected LVM2 & device mapper -target package, with standard install instead of only dmsetup. I configured the Linux kernel to have multiple devices driver support with device mapper support. System boots up without any problems, but logical volumes are inactive. If I execute vgchange -ay they are activated and can be mounted.My question is, what is the proper way of automatically activating volumes during boot? Is there some configuration option for that? Or do I really need to execute vgchange -ay at some point during boot (e.g. /etc/inittab)? Some sources seem to suggest that VGs/LVs are usually automatically activated on boot, but I'm unsure if they are just referring to implementations of initialization process on popular distributions.
What is the proper way to activate VGs/LVs automatically on boot?
busybox;lvm;buildroot
Yes, something has to run the LVM utility (as you say, vgchange -a y or similar) at some point. There is no magic that makes the kernel figure that one out by itself.In Initramfs this is usually done by the /init script (directly or indirectly). Some systems also scan for VG/LV whenever udev gets told of a new disk, but with devtmpfs you don't have that option either.So yes sure, just make an init script for LVM and have your init system execute it somehow.