Why the newly created raid is in recovering mode?

General support questions
Post Reply
netjune
Posts: 2
Joined: 2022/11/25 03:44:22

Why the newly created raid is in recovering mode?

Post by netjune » 2022/11/25 04:00:26

There 3 disks in system: /dev/sdb, /dev/sdc, /dev/sdd.

I created a leve-5 raid with the following commands:

mdadm --zero-superblock /dev/sdb
mdadm --zero-superblock /dev/sdc
mdadm --zero-superblock /dev/sdd
mdadm -Cv /dev/md0 -n 3 -l 5 /dev/sdb /dev/sdc /dev/sdd

Then I ran 'mdadm -D /dev/md0' and saw that the raid was in recovering mode. Is this expected?

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Why the newly created raid is in recovering mode?

Post by TrevorH » 2022/11/25 09:06:52

It's normal and expected.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

netjune
Posts: 2
Joined: 2022/11/25 03:44:22

Re: Why the newly created raid is in recovering mode?

Post by netjune » 2022/12/05 02:59:14

It takes one hour or even more to recover and recovers nothing finally.

Is it ok to do normal IO(read and write files) during the recovering?

Whoever
Posts: 1357
Joined: 2013/09/06 03:12:10

Re: Why the newly created raid is in recovering mode?

Post by Whoever » 2022/12/05 06:36:38

netjune wrote:
2022/12/05 02:59:14
It takes one hour or even more to recover and recovers nothing finally.

Is it ok to do normal IO(read and write files) during the recovering?
Yes. But be aware that you won't have protection against disk failure until the recovery is finished. Also, if your I/O is sustained and intensive, both the I/O (reading and writing files) and the recovery will be slow.

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Why the newly created raid is in recovering mode?

Post by jlehtone » 2022/12/05 09:46:46

The "recovery" is actually "initialization".
The "invariant" of RAID-5 is that the content of every block on a disk can be computed from the content of all the other disks in the array.
You did start with disks that do not have known content. Therefore, the invariant was not established.
One has to initialize the array by writing to every block of every disk first.

Yes, that takes time. The bigger the disks, the longer it takes.
On hardware RAID one can usually set how many % of bandwidth is used for initialization/recovery.

On recovery everything from the good disks is read and corresponding content is written into the replacement.

The consumer disks do make uncorrectable errors about 1 in 1E14 operations. The multi-terabyte disks have more than 1E14 sectors.
That means that read/write of entire big disk has "fair chance" to introduce errors. RAID-5 is unable to protect against that; insufficient redundancy.

Post Reply