The /sbin/init script in the initrd created by lvm2create_initrd includes a use of the variable $LVM, however no such variable is defined within the /sbin/init script. The $LVM variable defined in the lvm2create_initrd script itself is not interpolated into the /sbin/init script because of the 'INIT' syntax in the << here document (which is certainly necessary). I was able to work around this by adding LVM=lvm.static at the top of the <<'INIT' document, but this hard-code would not handle the situation where the user wishes to pick a different binary through the USE of the LVM environment variable around the lvm2create_initrd. Reproducible: Always
Please submit changes for the lvm2create_initrd script to upstream. There's at least one other bug for the LVM variable.