If you want to boot from a dmraid which has a GPT partition, the partitions will not be recognized. dmraid with a MBR partition works as expected. Reproducible: Always Steps to Reproduce: 1. create a GPT partition on a dmraid 2. call genkernel to create the initramfs Actual Results: After booting only the RAID is recognized, but not the partitions on it. Expected Results: Partitions will be recognized and be able to boot from them.
Created attachment 343146 [details, diff] Patch to fix booting from a GPT partition on a dmraid Quick hack to include dmsetup and kpartx (if multipathtools are installed) which generates the proper partition block devices
I can absolutely confirm this bug exists. I have multiple computer runing on soft-raid-0 and use GPT/EFI, gentoo won't update the partiton on my raid devices, only listing the whole disk like /dev/mapper/isw_xxxx, no partition at all. and another problem is the patch on my system don't work either. because 'dmsetup ls --target mirror ' won't return anything. so with kpartx in initramfs, there is still no partition created by kpartx.
Thanks for the report. Which kernels are you guys using?
both hardened-sources-3.8.x and gentoo-sources-3.7.x and I don't think this problem is kernel related, it's genkernel's bug.
(In reply to Steve Yin from comment #4) > both hardened-sources-3.8.x and gentoo-sources-3.7.x > > and I don't think this problem is kernel related, it's genkernel's bug. Thanks. I am unfamiliar with dm raid, so I want to try reproducing this on my end.
Ok, the patch provided by Markus Lidel didn't work on my computer, because all my raid are set to use raid0, but I've found a correct way to activate the gpt partition on dmraid which should be kpartx -a -s /dev/mapper/`dmsetup ls|cut -f 1` dmsetup ls command will list any existing recognized raid devices like this format: isw_dfeafdege_Volume0p5 (252:4) isw_dfeafdege_Volume0p3 (252:3) isw_dfeafdege_Volume0p2 (252:2) isw_dfeafdege_Volume0p1 (252:1) isw_dfeafdege_Volume0p10 (252:9) isw_dfeafdege_Volume0p9 (252:8) isw_dfeafdege_Volume0p8 (252:7) isw_dfeafdege_Volume0p7 (252:6) isw_dfeafdege_Volume0 (252:0) isw_dfeafdege_Volume0p6 (252:5) as you can see, only isw_dfeafdege_Volume0 is needed by kpartx, if dmsetup can output all these partition, kpartx will fall to execute, but if no partition created yet, then dmsetup ls will only ouput one line isw_dfeafdege_Volume0 (252:0) then, kpartx should be able to create all these partitions. I think my solution is not best, because I assume every computer with dmraid only created with one raid volume. so I think this might be help.
Created attachment 374206 [details, diff] Patch to fix booting from a GPT partition on a dmraid Removed target from dmsetup to rescan all DM devices
[master fcc197b] dmraid: fix booting from a GPT partition on a dmraid. Author: Markus Lidel <Markus.Lidel@shadowconnect.com> 2 files changed, 4 insertions(+)