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 was just wondering what it means when people say that disks are "mirrored" to increase reliability. Is this some kind of alternative to RAID? Or are they referring to the properties of certain file systems?

*edit -> What's the point of RAID 0 if mirroring corresponds to RAID 1?

share|improve this question
    
Your RAID 0 question probably belongs in a separate question, but the point of RAID 0 is to improve read and write performance. It doesn't do any mirroring, and isn't actually redundant at all... thus calling it 'AID' would make more sense. –  Flimzy Oct 27 '11 at 8:52
add comment

3 Answers

up vote 2 down vote accepted

Disk mirroring is a general concept: it means you map a logical device on more than one physical device and keep the data in sync in real-time.

Now RAID 1 its the most common technology used for mirroring.

It has nothing to do with filesystems, with disk mirroring you usually replicate device blocks (just bytes).

Of course the word 'mirroring' is used in many different contexts (e.g., FTP archive mirroring) but from your question I assume we are speaking of device mirroring.

share|improve this answer
1  
ZFS, which has a filesystem component also includes a feature to duplicate blocks. So in some less common situations mirroring is not separate from the filesystem. –  Zoredache Oct 27 '11 at 7:25
1  
@KaitlynMcmordie, RAID 0 = I Hate my data. Basically you store half the data on two drives. This disk operations will be faster. But it comes at the cost of reliability. A single failure in a RAID-0 means all your data is lost from every drive. –  Zoredache Oct 27 '11 at 7:27
1  
@Zoredache RAID 0 does not mean you don't care about your data. There are many applications where you have a separate backup and you don't need real-time mirroring. It just means you don't have any protection from failures from your RAID configuration. But you could have other ways to care. –  Matteo Oct 27 '11 at 7:30
1  
Losing a single sector on single disk is pretty uncommon in my experience. More likely there will be some kind of mechanical failure which will result in the lose of an entire disk. But yes, if only one block was broke on one drive, then you could still read everything else, provided you have a RAID controller, that let you continue, and didn't immediately fail out the volume. –  Zoredache Oct 27 '11 at 7:39
1  
Zoredache is right about failures, but Matteo is right about data concerns. Just because you're running in RAID0 doesn't automatically exclude the possibility of data redundancy... –  Shinrai Oct 27 '11 at 14:15
show 4 more comments

RAID is just a general term for a number of different hard drive management techniques.

Mirrored is not an alternate to RAID, it is in fact a form of RAID - Mirror is RAID 1.

A list of all the RAID levels can be read from Wikipedia.

Based on the mirror, basically, if one hard drive fails the other one should be able to pick up the slack.

The higher the quality of the RAID controller, the better the features* - for example, on budget models, if a drive was to fail during a write, it would be corrupt... On higher quality cards, it is possible that they contain some sort of cache/memory of their own and if it detects that a failure occurred, it will automatically write to the other drive (very smart stuff!)

RAID is not a property of a filesystem, you usually set up the RAID level on a RAW hard drive using some sort of manager, then, you will use the hard drive like normal with all the "magic" being done in the background - so - it is completely filesystem independent.

* As well as controllers, there is of course software RAID, this typically has the lowest features and is a CPU hog as there is no offloading, but, it can work well!

share|improve this answer
    
I'm assuming by RAID card you mean the controller? –  Kaitlyn Mcmordie Oct 27 '11 at 7:25
1  
@KaitlynMcmordie Sorry, yes - I have made it a bit clearer and added about software at the bottom. –  William Hilsum Oct 27 '11 at 7:31
add comment

Mirroring disks is one of the different RAID Levels - namely RAID 1.

RAID is an abbreviation for Redundant Array of Independent Disks others say Redundant Array of Inexpensive Disks. The different RAID Levels describe how multiple disks (or just partitions) are arranged.

In a mirroring or RAID 1 setup identical data is stored on at least two different disks. This may be done by the Operating System (then one speaks of Software RAID) or by dedicated disk controllers or disk subsystems (the it is named Hardware RAID).

There are slight differences (or one may call them tunable parameters) on how mirroring will be achieved:

  1. A write operation is considered done if the data was written to at least one disk

  2. A write operation is considered done when it was written to both disks (slower, more secure)

Also the time of the write operation differs between implementations. Some defer the write to the 2nd disk until the write operation on the first disk is done, where others write simultaneusly to both disks (the latter is obviously faster, whereas the first one is more secure in case of power failure, because it is alwyas critical if power fails in the middle of a write operation.

For further reading I suggest to wiki on the subject RAID.

share|improve this answer
    
So basically, do multiple disk controllers (each controller corresponding to a disk) hook up to one RAID controller (if they consitute an array)? –  Kaitlyn Mcmordie Oct 27 '11 at 8:01
    
One last thing! the wiki it mentions zfs under software RAID, but was really curious about what zfs does in order to support such operations? –  Kaitlyn Mcmordie Oct 27 '11 at 8:04
1  
1st: Normally one controller handles multiple disks, but I've seen scenarios where multiple controllers were in chain. 2nd: ZFS is a beast, incorporating parts from filesystem, LVM and RAID Layers. –  ktf Oct 27 '11 at 8:14
    
Basically, what kind of mechanism or structure does zfs use to incoporate RAID? –  Kaitlyn Mcmordie Oct 27 '11 at 17: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.