search cancel

ERROR: Both disks already in array" after the attempt to recovery of the broken RAID1 status


Article ID: 167821


Updated On:




ERROR: Both disks already in array" after the attempt to recovery of the broken RAID1 statusOn a CPM-8600 module, you may receive the following message when the command "/crossbeam/bin/xos-raid-add" is executed to attempt the recovery of a Broken RAID 1 configuration.

ERROR: Both disks already in array


If the two disks are shown in the /proc/scsi/scsi file after following the steps to recover a broken RAID1 array (see appropriate solution for details), but you get the message "ERROR: Both disks already in array" when you run the command "/crossbeam/bin/xos-raid-add", please check the output of "cat /proc/mdstat". It is possible that the RAID rebuild is failing because at least one array is in a good state.

In the following example, the output of "cat /proc/mdstat" (from a CPM where the raid rebuild was failing) showed that md8 was already in a good state:

[[email protected] /]# cat /proc/mdstat

Personalities : [raid0] [raid1]
read_ahead 1024 sectors
Event: 5
md1 : active raid1 sda1[1]
104320 blocks [2/1] [_U]

md5 : active raid1 sda5[1]
505920 blocks [2/1] [_U]

md6 : active raid1 sda6[1]
1003904 blocks [2/1] [_U]

md7 : active raid1 sda7[1]
8008256 blocks [2/1] [_U]

md8 : active raid1 sda8[1] sda8[0]
28001152 blocks [2/2] [UU]
<<------------------ completed RAID status on md8 array


The following non-intrusive method can be used to selectively rebuild a raid array.

Run "mdadm -a /dev/mdX /dev/sdNX" command. Using the example above:

mdadm -a /dev/md1 /dev/sdb1
mdadm -a /dev/md5 /dev/sdb5
mdadm -a /dev/md6 /dev/sdb6
mdadm -a /dev/md7 /dev/sdb7

NOTE: This assumes the example output of /proc/mdstat shown above. If sda is the disk missing from /proc/mdstat instead, modify the above commands to use sda instead of sdb.

The system will function normally when the RAID arrays are rebuilding in the background. However, if you have CP redundancy enabled, it is recommended that the affected CPM is not the Primary CPM when you attempt to run the commands provided in this solution.