Receiving an error ‘mdadm failed to run_array’ while executing a command on Debian or Ubuntu Linux? We can help you fix it.
We recently received a request from our customer where he received an error “Failed to RUN_ARRAY /dev/md0 invalid argument” while running the below command.
mdadm -Ac partitions /dev/md0 -m dev
Here at Bobcares, we have seen several such RAID-related errors as part of our Server Management Services for web hosts and online service providers.
Today we’ll see the cause for this error message. Also, let us see how to rebuild the array on Linux operating system using mdadm command.
Why does ‘mdadm failed to run_array’ error occurs
Here are the different causes for this error message to occur.
- It indicates that the RAID metadata is lost or is no longer consistent.
- If the kernel does not support the raid mode that we are trying to utilize.
- If the directory ‘/lib/module/$(uname -r)’ is missing then the Raid module cannot load.
How we resolve ‘mdadm failed to run_array’ error message
Now let’s take a look at how our Support Engineers resolve this error for our customers.
1. The following command can fix the issue if the other two drivers are known to be good. /proc/mdstat file will provide RAID status and make sure RAID is active. We run the below command at a shell prompt to fix this issue:
mdadm -A /dev/md0 -f –update=summaries /dev/sda1 /dev/sdb1
2. Another way to resolve this error is, first, we check if CONFIG_MD_RAID* is set (look at /boot/config*). CONFIG_MD_RAID0=m represents that the raid0 support is built as a module (m for module). And md: personality for level 0 doesn’t load, which means the module is not loaded. We run the below command to load it.
modprobe raid0
Then we should be able to create the array.
3. To check if md support is available in the kernel config file, we execute the command given below:
grep _MD_ /boot/config-`uname -r`
It would be present as modules.
[Need any further assistance with RAID errors? – We are here to help you.]
Conclusion
In today’s writeup, we saw how our Support Engineers resolve the RAID error.
0 Comments