Virtual drive

Concept

Not yet checked against a primary source — how the pages are sourced

The logical volume the operating system sees: one block device with a contiguous address space, behaving exactly like a single disk. It behaves that way whatever number of disks, spans or RAID levels sit underneath. It need not take the whole span; a span can host several.

A virtual drive is the block device that the operating system, the file system and the applications work with. It has a contiguous address space organized in sectors, with numbering starting from 0, and every request to it goes to the raid engine, which translates it onto the members by the segmentation of the span below and produces whatever the redundancy asks for. Above the virtual drive nothing knows there is an array: this decoupling of physical layout from logical addressing is what makes RAID transparent to the software running on it.

Container and content

The three layers nest. A drive group contains disks; a span is some of those disks under one layout; a virtual drive is a slice of the usable capacity that results. RAID 10 shows all three at once, read from the top, what the operating system is given, to the bottom, what is physically there:

what the operating system sees

          ┌───────────────┐
          │ virtual drive │
          └───────┬───────┘
                  │   a slice of the group's usable capacity
                  ▼
┌─ drive group: RAID 10, the two spans striped together ────────┐
│                                                               │
│   ┌─ span 0: RAID 1 ────────┐   ┌─ span 1: RAID 1 ────────┐   │
│   │  ┌──────┐   ┌──────┐    │   │  ┌──────┐   ┌──────┐    │   │
│   │  │disk 0│   │disk 1│    │   │  │disk 2│   │disk 3│    │   │
│   │  └──────┘   └──────┘    │   │  └──────┘   └──────┘    │   │
│   └─────────────────────────┘   └─────────────────────────┘   │
│                                                               │
└───────────────────────────────────────────────────────────────┘

Each span gives its two disks one layout, a mirror. The group holds the two spans and carries the layout that joins them, a stripe across the spans: the mirror is the span's, the stripe is the group's, and the pair is what RAID 10 means. The virtual drive is what the whole is presented as; the operating system sees that box and nothing below it. In a flat level (a RAID 5 on four disks) the group holds one span and has no layout of its own. The drive group and span entries describe the two lower layers; this figure is the one they point back to.

It does not have to be the whole span

In Broadcom's MegaRAID definition, "a virtual drive is a partition in a drive group that is made up of contiguous data segments on the drives", and it can be an entire drive group, several, a portion of one, or parts of several. So a 6 TB span could host a 2 TB virtual drive and leave 4 TB available for another, as long as the total stays within the span's capacity. Each virtual drive is then a separate disk to the operating system.

The same object under other names

On a controller the operating system is given the virtual drive and nothing else: the member disks are hidden behind it. In Linux software RAID the object is the md device, /dev/md0 and its siblings, and the member disks stay visible beside it. In Windows it is the storage space carved from a pool, which Microsoft also calls a virtual disk. Three names, one thing: the block device an array becomes.

Sources