Mirroring involves having two copies of the same data on separate hard drives or drive arrays. So basically the data is effectively mirrored on another drive. The system basically writes data simultaneously to both hard drives. This is one of the two data redundancy techniques used in RAID to protect from data loss. The benefit is that when one hard drive or array fails, the system can still continue to operate since there are two copies of data. Downtime is minimal and data recovery is relatively simple. All you need to do is rebuild the data from the good copy.
The following diagram illustrates how mirroring actually works. Of course, this is a simplified diagram. A, B, and C are separate files that reside on each disk. Disk 1 and 2 in this diagram don't necessarily have to be disks themselves. They can be arrays of drives. The main thing to remember here is that the RAID controller writes the same data blocks to each mirrored drive. Each drive or array has the same information in it. You can even add another level of complexity by introducing striping, which will be discussed shortly. I'm not going to get into what striping is now if you're not familiar with it, but just know it increases performance. If you have one striped array, you can mirror the array at the same time on a second striped array. It can get very complicated. To set up mirroring the number of drives will have to be in the power of 2 for obvious reasons.
The drawback here is that both drives are tied up during the writing process which limits parallelism and can hurt performance. In contrast, mirroring has a performance increase when dealing with reads. A good RAID controller will only read from one of the drives since the data on both are the same. While the other is used to read, the free drive can be used for other requests. This increases parallelism, which is pretty much the concept behind the performance increase of RAID.
Mirroring may seem like a good solution to ensure the safety of data. However, the trade off here is the cost and wasted space involved with having two copies of the same data. You will need twice as much storage space to mirror the data. It can be cost effective for some applications where downtime can mean the downfall of a company or even loss of human life. Most of the time, however, it might not be worth it. Data might not be that critical to warrant spending twice as much on storage. The alternative to mirroring is parity, which is what the next section deals with.