Saturday 23 December 2017

How does RAID 1 determine which drive should act as the source for a rebuild?


Here's my scenario -- both drives were working perfectly fine. I removed one of the drives for a while (building a new PC, didn't think I was going to use RAID anymore but changed my mind). I actually switch the SATA type to AHCI and was operating for about a week on the new system before deciding to re-enable RAID and reinstall the drive I had removed.


It's currently rebuilding, but I'm curious how it knows which one is the source and which one is out-of-date?



Answer



if you had it powered up at any point with one drive. it will usually have something like a write counter on the drive. so it will take whichever one is higher as the master.


So if you take out drive A for a week, but keep running with drive B, it would have had some writes in that time, and have a higher write counter. and then it would be the master.


Some controllers will base it off of what was there on last boot. if a drive was missing for a week, then it re-appears, it is now considered out of sync.


If you were to remove both drives simultaneously, it would depend on the controller as to what it would do. Most likely just show a foreign array you can import.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...