Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I used to have a three-disc RAID5 (mdadm) in my computer for personal media storage (music, videos, photos, programs, games, ...). It had three discs with 750 GB each, resulting in an array capacity of 1.5 TB.

One day (one year ago), I needed one of those discs to install another operating system. I thought, I don't need the redundancy anymore since I backup the most important stuff (personal photos e.g.) on an external disc anyway. So I decided to remove one of the three discs without converting the RAID to RAID0 or even two separate discs, because I had no temporary storage (since one cannot simply convert the RAID5 to RAID0 AFAIK).

So now, for about one year, I have a non-redundant RAID5 with 2 of 3 discs running. Sometimes, one of the discs has a defective contact at the power cable or something similar causing the drive to stop working temporarily (I don't know exactly what it is). Since it still works when rebooting the computer and in most cases by calling some mdadm commands, it wasn't that problematic. Note that the data is not very critical, since I still have a backup of the most important stuff.

But in the last few weeks, one of the drives fails very frequently (every few hours), so it gets really annoying to manage this.

My questions are:

  • Is there any disadvantage (apart from the annoying management) of a non-redundant RAID5 (with one drive less than typical) over a RAID0? If I understand it correctly, both have no redundancy and the same capacity. On a temporary drive failure, I can restart the array in both cases, assuming that the drive itself still works after the failure.

  • Can it happen that the drive contents alter on a drive failure, making the array inconsistent? If so, can I tell mdadm to check the array for failures (without a file system level checking tool)?

  • Since the drive most probably only has a defective contact causing it to fail for a second only, can I tell mdadm to automatically restart the array, so I will not even notice the failure if no application wanted to access the file system during the failure?

share|improve this question
    
As far as disadvantage... remember that RAID 5 stripes across disks, and generates parity data. This puts load on the controllers, should be a touch slower than the equivalent RAID0. –  Rich Homolka Aug 28 '12 at 20:30
1  
Is RAID without redundancy still RAID? I think it's AID. –  Mr Lister Aug 28 '12 at 21:26
    
@MrLister So RAID0 also is an AID ;) –  leemes Aug 31 '12 at 15:48

2 Answers 2

up vote 4 down vote accepted

RAID5 suffers a write penalty compared to other RAID formats due to the parity calculation, even with the full drive set. Since you're doing software RAID, this impacts system performance, not just drive performance, as the CPU is what is doing all the parity calculation. This may or may not be noticeable, depending on your system and what you're doing when it's accessing the drive, but it's worth noting. Without the third drive, I would imagine there's a bit of a performance hit to reads as well, since all the data that would typically live on that third drive now has to be calculated via parity bits rather than read directly. There may be other implications, but performance hits are the big ones I'm aware of.

I'm not familiar enough with your other questions to provide an answer, but at this point I'd suggest re-purposing the drives to run independently if at all possible. It won't be as useful as having them appear as one drive, but you won't have to deal with the intermittent drive failures, and it should lessen the strain on the rest of your system. The hard part would of course be the migration, but maybe a friend can loan you some disks?

One other thing to consider: is this literally JUST storage, or is some of the filesystem located on the array (/usr, /var, /bin, or anything similar)? If anything system-related is on these at all, it could lead to significant system instability with the unreliability of the array.

share|improve this answer
    
No, I do not have a part of my system on the array, however, I have some files I work with on the array. (But they are in a git repository I push frequently, so in case of a loss of the whole array, this isn't really problematic too.) I sometimes notice a 5 second delay when accessing the array (IO wait), which I cannot explain, but I'd guess that it's the fact that one drive is missing which causes this effect. –  leemes Aug 28 '12 at 21:40

Is there any disadvantage (apart from the annoying management) of a non-redundant RAID5 (with one drive less than typical) over a RAID0?

Yes. RAID5 writes are slower than RAID0 writes, regardless of whether or not you have a full disk set.

Can it happen that the drive contents alter on a drive failure, making the array inconsistent?

Yes; but this is file system corruption, so this could happen regardless of which RAID set you use if the entire array is being taken offline. A very typical example of this is a RAID5 array with write cachin. It reports that the file is written to the disk so that the OS can continue with its processing, but in actual fact it is not written to the disk, the RAID controller is still calculating its parity, and will write it to the disk moments later. If power is lost between it reporting All OK and the data being written, you'll probably have unrecoverable file system corruption. This is why RAID-5 is generally only used with a battery backup cache, or write caching turned off.

If so, can I tell mdadm to check the array for failures (without a file system level checking tool)?

Since the drive most probably only has a defective contact causing it to fail for a second only, can I tell mdadm to automatically restart the array, so I will not even notice the failure if no application wanted to access the file system during the failure?

Don't know enough about Linux's mdadm to answer this, sorry. But I do know enough about failed hard drives to tell you that it's only a matter of time before that 750gb drive dies forever and you find yourself restoring from backups.

Better to replace all those drives and build a new, fully redundant array than to put in some hackish workaround.

share|improve this answer
    
I'll second the bit about the other drive failing and that a replacement is really the only true solution. –  ND Geek Aug 28 '12 at 20:45

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.