ArticleslgStudy

computer science

Disk mirroring

Disk mirroring is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Disk mirroring rather than just read about it. In short: In data storage, disk mirroring is the replication of logical disk volumes onto separate physical hard disks in real time to ensure continuous availability. It is most commonly used in RAID 1.

Disk mirroring — main illustration
Disk mirroring — illustration

Key takeaways

  • Disk mirroring belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Disk mirroring to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Disk mirroring from memory before moving on to harder problems.

Reference excerpt

In data storage, disk mirroring is the replication of logical disk volumes onto separate physical hard disks in real time to ensure continuous availability. It is most commonly used in RAID 1. A mirrored volume is a complete logical representation of separate volume copies. In a disaster recovery context, mirroring data over long distance is referred to as storage replication. Depending on the technologies used, replication can be performed synchronously, asynchronously, semi-synchronously, or point-in-time. Replication is enabled via microcode on the disk array controller or via server software. It is typically a proprietary solution, not compatible between various data storage device vendors. Mirroring is typically only synchronous. Synchronous writing typically achieves a recovery point objective (RPO) of zero lost data. Asynchronous replication can achieve an RPO of just a few seconds while the remaining methodologies provide an RPO of a few minutes to perhaps several hours. Disk mirroring differs from file shadowing that operates on the file level, and disk snapshots where data images are never re-synced with their origins.

Overview Typically, mirroring is provided in either hardware solutions such as disk arrays, or in software within the operating system (such as Linux mdadm and device mapper). Additionally, file systems like Btrfs or ZFS provide integrated data mirroring. There are additional benefits from Btrfs and ZFS, which maintain both data and metadata integrity checksums, making themselves capable of detecting bad copies of blocks, and using mirrored data to pull up data from correct blocks. There are several scenarios for what happens when a disk fails. In a hot swap system, in the event of a disk failure, the system itself typically diagnoses a disk failure and signals a failure. Sophisticated systems may automatically activate a hot standby disk and use the remaining active disk to copy live data onto this disk. Alternatively, a new disk is installed and the data is copied to it. In less sophisticated systems, the system is operated on the remaining disk until a spare disk can be installed. The copying of data from one side of a mirror pair to another is called rebuilding or, less commonly, resilvering. Mirroring can be performed site to site either by rapid data links, for example fibre optic links, which over distances of 500 m or so can maintain adequate performance to support real-time mirroring. Longer distances or slower links maintain mirrors using an asynchronous copying system. For remote disaster recovery systems, this mirroring may not be done by integrated systems but simply by additional applications on primary and secondary machines.

See also Business continuance volume – EMC Corporation's term for redundant copies of data in a disk array Disk cloning – Process of duplicating all data on a digital storage drive Distributed Replicated Block Device (DRBD) – Distributed replicated storage system for Linux Mirror site – Replica of website components hosted elsewhere Stable storage – Computer data storage that guarantees atomicity

References

Illustrations

Disk mirroring: RAID 1 layout
RAID 1 layout

Worked examples

Example 1 — a first encounter with Disk mirroring

Start with the simplest possible case. Write down what Disk mirroring claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Disk mirroring before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Disk mirroring ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Disk mirroring

In research
Disk mirroring appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Disk mirroring in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Disk mirroring is common in secondary-school and first-year university syllabi. It links to neighbouring topics Fault-tolerant computer systems, RAID, so understanding it makes those chapters shorter.
In everyday life
Look for Disk mirroring outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Disk mirroring” →

How to study Disk mirroring in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Disk mirroring means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Disk mirroring out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Disk mirroring in simple terms?

In data storage, disk mirroring is the replication of logical disk volumes onto separate physical hard disks in real time to ensure continuous availability. It is most commonly used in RAID 1.

Why does Disk mirroring matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Disk mirroring?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Disk mirroring.

Tags

  • Fault-tolerant computer systems
  • RAID

Keep exploring