I'm using ver. mdadm-4.1-24.3.1.x86_64 / openSUSE kernel 15.3 It's only when the array is active you get a raid-level, if the array is inactive, as in my example, you will not get the raid-level (and State, Persistence). On Tue, Jul 6, 2021 at 11:48 AM Fine Fan <ffan@xxxxxxxxxx> wrote: > > Hi Brain, > > I am wondering which version did you use? > As you requested three items here: > 1."Raid Level",<<<<<<====== I have the "MD_LEVEL" line in --export output. > 2."State" > 3."Persistence" > > On my side , I am using : > [root@Fedroa34Server ~]# cat /etc/redhat-release > Fedora release 34 (Thirty Four) > [root@Fedroa34Server ~]# uname -a > Linux Fedroa34Server.localdomain 5.11.12-300.fc34.x86_64 #1 SMP Wed Apr 7 16:31:13 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux > [root@Fedroa34Server ~]# rpm -q mdadm > mdadm-4.1-7.fc34.x86_64 > [root@Fedroa34Server ~]# > > It has "MD_LEVEL" in the --export output , but the "State" and "Persistence" are not there. > > [root@Fedroa34Server ~]# mdadm --detail --export /dev/md126 > MD_LEVEL=raid1 <<<<<<<<<============ I got the MD_LEVEL here. > MD_DEVICES=2 > MD_CONTAINER=/dev/md/imsm > MD_MEMBER=0 > MD_UUID=8e3f51e6:d136a0b1:247281c2:ae7f0456 > MD_DEVNAME=Volume0 > MD_DEVICE_ev_sda_ROLE=0 > MD_DEVICE_ev_sda_DEV=/dev/sda > MD_DEVICE_ev_sdb_ROLE=1 > MD_DEVICE_ev_sdb_DEV=/dev/sdb > > [root@Fedroa34Server ~]# mdadm --detail /dev/md126 > /dev/md126: > Container : /dev/md/imsm, member 0 > Raid Level : raid1 > Array Size : 234428416 (223.57 GiB 240.05 GB) > Used Dev Size : 234428416 (223.57 GiB 240.05 GB) > Raid Devices : 2 > Total Devices : 2 > > State : clean > Active Devices : 2 > Working Devices : 2 > Failed Devices : 0 > Spare Devices : 0 > > Consistency Policy : resync > > > UUID : 8e3f51e6:d136a0b1:247281c2:ae7f0456 > Number Major Minor RaidDevice State > 1 8 0 0 active sync /dev/sda > 0 8 16 1 active sync /dev/sdb > [root@Fedroa34Server ~]# > > > > > > > On Mon, Jul 5, 2021 at 8:21 PM BW <m40636067@xxxxxxxxx> wrote: >> >> This is an example of the --export output: >> >> # mdadm --detail --export /dev/md127 >> MD_DEVICES=3 >> MD_METADATA=1.2 >> MD_UUID=70bc1acd:f879f9cd:dca76d79:d9ce624a >> MD_DEVNAME=debian:R5 >> MD_NAME=debian:R5 >> MD_DEVICE_dev_sdc_ROLE=spare >> MD_DEVICE_dev_sdc_DEV=/dev/sdc >> MD_DEVICE_dev_sdd_ROLE=spare >> MD_DEVICE_dev_sdd_DEV=/dev/sdd >> MD_DEVICE_dev_sdb_ROLE=spare >> MD_DEVICE_dev_sdb_DEV=/dev/sdb >> >> This is the same command in "normal" format-output: >> >> # mdadm --detail /dev/md127 >> /dev/md127: >> Version : 1.2 >> Raid Level : raid5 >> Total Devices : 3 >> Persistence : Superblock is persistent >> State : inactive >> Working Devices : 3 >> Name : debian:R5 >> UUID : 70bc1acd:f879f9cd:dca76d79:d9ce624a >> Events : 358 >> Number Major Minor RaidDevice >> - 8 32 - /dev/sdc >> - 8 48 - /dev/sdd >> - 8 16 - /dev/sdb >> >> >> It would be nice if the --export included the properties "Raid Level", >> "State", "Persistence" (the first two most important). >> >> Another thing, is it correct that "MD_DEVNAME" and "MD_NAME" should be the same? >> Or perhaps "MD_NAME" should show the kernel/Device-Mapper name e.g. >> "md127", that would be helpful (by the way, what do you call this mdxx >> name?) >> >> Thanks >> Brian, Denmark >> > > > -- > > > > > Fine Fan > > Kernel Storage QE > > ffan@xxxxxxxxxx > > T: 8388117 > M: (+86)-15901470329