I've been trying to use ZFS as my rootfs with 12 disks attached to a M1015 controller plus expander. Obvious problem is the asynchronous attachment reorders the disks, making zfs crap its pants unless I create the zpools with disk ids.

anyways I've been having trouble figuring out how to get /dev/disks/by-id symblinks before rootfs is mounted. I've tried genkernel and Dracut generated initramfs but had no luck. I'm about to start making my own initramfs to try and solve this problem, but I'd prefer an existing solution.

Thanks for the fast response. I'll get on that as soon as I restore connectivity. I'm typing this on my phone cause the affected machine is the ISCSI target serving the gateway VM disk LUNs.

so anyways, I was thinking of copying over the udev rules and trying to get mdev to run them. This should be possible right?

I am afraid that it is not possible. mdev does not understand udev rules. Custom rules need to be written just for mdev. There is the possibility of bringing udev into genkernel's initramfs, which would solve this issue. Sabayon's genkernel already has this functionality. It could be ported, but one of us will need to make time to do it. I think Sabayon's genkernel is already in the tree as sys-kernel/genkernel-next. In theory, you should be able to use that to get this functionality, but I have not tested it and my plan is to merge the Sabayon changes back into genkernel.

Alright! Genkernel-next produced a good initramfs. it seems to incorrectly report a pool import error though. But it boots and the pool survives order changes just fine. So it seems like a good interim solution.

And now begins the long restoration from tape >_>

I'll remember to file that issue. And thanks for the support, you just saved me from having to obtain a license from horacle.