0

I'm using 3 disks (RAID5) and want to add a spare disk (dev/sdd). The system is using Intel RST (onboard RAID), and can be recognised by CentOS7 and mdadm command. But I tried many methods, and cannot add the spare disk as "hot spare".

[root@ehost ~]# mdadm --detail /dev/md/imsm0
/dev/md/imsm0:
      Version : imsm
   Raid Level : container
Total Devices : 3
Working Devices : 3
       UUID : 750b9700:31df2732:350d713c:10b17437
Member Arrays : /dev/md/Volume1
Number   Major   Minor   RaidDevice
   0       8        0        -        /dev/sda
   1       8       16        -        /dev/sdb
   2       8       32        -        /dev/sdc

[root@ehost ~]# mdadm --detail /dev/md126
/dev/md126:
  Container : /dev/md/imsm0, member 0
 Raid Level : raid5
 Array Size : 1953519616 (1863.02 GiB 2000.40 GB)
 Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
  Raid Devices : 3
 Total Devices : 3
         State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
 Spare Devices : 0

     Layout : left-asymmetric
 Chunk Size : 128K
       UUID : d984583f:721b097a:b725e6c2:55b874f4
Number   Major   Minor   RaidDevice State
   2       8        0        0      active sync   /dev/sda
   1       8       16        1      active sync   /dev/sdb
   0       8       32        2      active sync   /dev/sdc

[root@ehost ~]# mdadm --add /dev/md126 /dev/sdd
mdadm: Cannot add disks to a 'member' array, perform this operation on the parent container

[root@ehost ~]# mdadm --add /dev/md/imsm0 /dev/sdd
mdadm: added /dev/sdd

[root@ehost ~]# mdadm --detail /dev/md/imsm0
/dev/md/imsm0:
    Version : imsm
 Raid Level : container
 Total Devices : 4
Working Devices : 4
       UUID : 750b9700:31df2732:350d713c:10b17437
 Member Arrays : /dev/md/Volume1
Number   Major   Minor   RaidDevice

   0       8        0        -        /dev/sda
   1       8       16        -        /dev/sdb
   2       8       32        -        /dev/sdc
   3       8       48        -        /dev/sdd

[root@ehost ~]# mdadm --detail /dev/md126
/dev/md126:
  Container : /dev/md/imsm0, member 0
 Raid Level : raid5
 Array Size : 1953519616 (1863.02 GiB 2000.40 GB)
  Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
   Raid Devices : 3
     Total Devices : 3

      State : clean
 Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
     Layout : left-asymmetric
 Chunk Size : 128K
       UUID : d984583f:721b097a:b725e6c2:55b874f4
Number   Major   Minor   RaidDevice State
   2       8        0        0      active sync   /dev/sda
   1       8       16        1      active sync   /dev/sdb
   0       8       32        2      active sync   /dev/sdc
[root@ehost ~]#

Pls help help, thanks ! Edwin

0

A hardware RAID is completely different than a software raid.

In a hardware RAID, there is some hardware card that owns the disks.
That card presents the disks in a different way (as a raid) to the OS.

In software RAID, the OS owns the devices (sda, sdb, etc) and builds the raid devices (in the case of linux "multiple devices": md0, md1, etc)

I suspect that your md126 is a software raid and that the imsm0 is the hardware raid.

Have you used or activated the -e imsm switch of mdadm?

If that is the case, you need to manage Intel devices with Intel sofware.

Please read this

And download Intel's PDF

  • I tried "mdadm -a -e imsm /dev/md126 /dev/sdd" , returns "option -e not valid in manage mode". As mentioned before, I tried "mdadm --add /dev/md/imsm0 /dev/sdd", and the drive was successfully added, but doesn't show it is "Spare device" I checked the URL and PDF that you mentioned, but didn't help much. I just can't add the "sdd" as hot-spare and shown as "Spare devices" when using "mdadm --detail /dev/md126" !! Thanks anyway, much appreciated ! – edwin Jun 23 '17 at 9:57
  • the only course of action at this level is to fail one running device (an mdadm command) and analyze if the spare is auto rebuilt to fill the now missing (failed) disk. But that is never, ever a good idea with production data on a running os over such RAID. Unless you can take a backup and start the OS form an spare disk (which will be released quite fast after the tests) there is nothing safe that I can recommend doing. – Arrow Jun 23 '17 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.