Monday, November 12, 2018

raid - Why does linux automatically start a hardware RAID1 resync, on two new and blank disks and how do I stop it?



I've looked at similar posts about software RAID, but this is a hardware RAID question, and googling did not turn up anything so I turn to you guys.




I understand that hardware RAID has a single-point of failure, i.e. the RAID controller, but I'm willing to take this risk.



Here's a little background on the situation at hand. I have a DELL Precision T7600 at work that I'm responsible for maintaining, which just lost a hard-drive, thankfully just the /home directory was on it, and has now been recovered. Now I've been tasked with making a RAID 1 of the OS drive so that our downtime is to a minimum.



I plugged in two brand spaking new WD Blacks in the system, and fired up a Manjaro Live USB after making the RAID 1 array using the integrated RAID controller. The distro picked up the RAID array as /dev/md126, and immediately started a resync with its partner drive. Now this would make sense if one of the drives had just failed and a rebuild was necessary, but this is not the case. They are both new blank drives to reiterate. cat /proc/mdstat gives me an estimate of ~200 min, which I'm not willing to spend without doing something about it.



So my question to you guys is why is this happening and how can I stop this useless time-wasteful process?



Now granted, I'm very new to RAID, so if I'm misunderstanding something feel free to correct my ignorance :).


Answer




Your drives are completely new, but what if they have some data? The OS does not know that until it does the resync. Otherwise you might end up with inconsistent array (in case the drives were used and already had some data).



When creating the array, you can bypass the initial sync if you are sre that the drives are new using the --assume-clean parameter, it is not recommended though.



You can use the array while it is resyncing and resync only minimally affects performance.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...