Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i had a power outage. before the outage my RAID 5 (4 SATA drives) was fully synced. perhaps I was doing some trivial writes during the poweroutage, but afterwards windows decided it has to do a full resynchronization.

Why does windows have to do that? any way to prevent it? I would expect only the bytes/sectors being written would require re-synchronization, not the entire thing.

Thanks

share|improve this question
    
Just go back and think about what you asked. How does it know which sectors were being written as the power was cut? –  JamesRyan Apr 30 '12 at 9:17
    
a bit snarky huh? ;) sure at the disk level, maybe can not. but since i'm talking about windows OS software RAID, I'd think/hope that this is something that'd work with NTFS: marking the file as dirty as step #1 then doing the writes, then marking it back as clean. maybe my wistful thinking eh, though sounds efficient enough to me.... –  JasonS Apr 30 '12 at 10:21
    
The harddrive has no concept of a file, just blocks of data. Writes are already small so multiplying them by 3 isn't going to be very efficient. Strategies like you suggest are done at the filesystem level on top of RAID to prevent corruption. –  JamesRyan Apr 30 '12 at 10:43
add comment

1 Answer

up vote 4 down vote accepted

perhaps I was doing some trivial writes during the poweroutage

As far as RAID is concerned, there's no such thing as a "trivial write". A write is a write, and if the RAID goes down in an unclean state, where there's a strong possibility that a write didn't get properly written everywhere it needed to, it's going to do a full resync to make sure things are healthy.

To prevent this, use a hardware RAID controller with a battery-backed write cache. Short of changing to a hardware RAID controller, at least get yourself a UPS with a long enough capacity to make it through short power outages. Good quality UPSes can also be configured to automatically shut down your servers gracefully in the event of a power outage. This would also prevent your RAID and filesystem going down hard.

share|improve this answer
    
as mentioned in my reply to JamesRyan's comment, I'd hope that there was better collaboration between windows and the software RAID, but yeah. i already ordered a ups as my half-arsed solution. thanks for the answer. –  JasonS Apr 30 '12 at 10:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.