Well, I’m out of ideas of what to suggest, so I’m going to try and replicate this on my setup. So far I’ve done this on Rocky 8, and then I’ll disconnect the disks from the machine, and add to Rocky 9.
First, I’ve created the array, just with 3 x 20gb disks to keep it quick.
[root@rocky8 ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 vdd[3] vdc[1] vdb[0]
41908224 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
unused devices: <none>
Then set up my LVM groups/volumes:
[root@rocky8 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/md0 rocky-test lvm2 a-- 39.96g 0
[root@rocky8 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
rocky-test 1 1 0 wz--n- 39.96g 0
[root@rocky8 ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv-test rocky-test -wi-a----- 39.96g
Mounted it and put some data in it just for proof-of-concept:
[root@rocky8 raid]# mount | grep raid
/dev/mapper/rocky--test-lv--test on /mnt/raid type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,sunit=1024,swidth=2048,noquota)
[root@rocky8 raid]# ls -lha /mnt/raid/
total 1000M
drwxr-xr-x. 2 root root 22 Sep 15 21:52 .
drwxr-xr-x. 3 root root 18 Sep 15 21:51 ..
-rw-r--r--. 1 root root 1000M Sep 15 21:52 test.img
Deactivating the LVM volumes and stopping the array, and verifying with the LVM commands:
[root@rocky8 ~]# vgchange -an rocky-test
0 logical volume(s) in volume group "rocky-test" now active
[root@rocky8 ~]# mdadm --stop /dev/md0
mdadm: stopped /dev/md0
[root@rocky8 ~]# vgs
[root@rocky8 ~]# lvs
[root@rocky8 ~]# pvs
So, now I connected to the Rocky 9 machine all those disks, and installed mdadm, and lvm2:
[root@rocky9 ~]# mdadm --assemble /dev/md0 /dev/vdb /dev/vdc /dev/vdd
mdadm: /dev/md0 has been started with 3 drives.
[root@rocky9 ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 vdb[0] vdd[3] vdc[1]
41908224 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
unused devices: <none>
so, now we have md0 active.
[root@rocky9 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/md0 rocky-test lvm2 a-- 39.96g 0
[root@rocky9 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
rocky-test 1 1 0 wz--n- 39.96g 0
[root@rocky9 ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv-test rocky-test -wi------- 39.96g
so on my Rocky 9 it has detected them perfectly fine. I would suggest you do something like:
mdadm --stop /dev/md0
and then do the assemble command similar to mine, but for yours it would be:
mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd /dev/sde1
and then after that, see if you can see the LVM stuff using pvs, pvscan, vgs, vgscan, lvs, lvscan. You can also try, if you know exactly what the volume group is called to do:
[root@rocky9 ~]# vgchange -ay rocky-test
1 logical volume(s) in volume group "rocky-test" now active
I’ve used my volume group as an example. And for data verification:
[root@rocky9 ~]# mkdir /mnt/raid
[root@rocky9 ~]# mount /dev/rocky-test/lv-test /mnt/raid
[root@rocky9 ~]# ls -lha /mnt/raid/
total 1000M
drwxr-xr-x. 2 root root 22 Sep 15 21:52 .
drwxr-xr-x. 3 root root 18 Sep 15 22:22 ..
-rw-r--r--. 1 root root 1000M Sep 15 21:52 test.img
shows that all is intact.
There is every possibility though that even after this if it does not show it then it would seem the LVM is somehow damaged perhaps the metadata it is the only thing I can think of if it still does not work.