August 23, 2026 posted by Leonardo Taccari
This report was written by Emmanuel Nyarko as part of Google Summer of Code 2026.
The Redundant Array of Independent Disks (RAID) is a disk management framework developed by Carnegie-Mellon University. NetBSD uses RAIDframe as one of its disks management modules. It involves setting up multiple disks and creating a disk unit from them. The current NetBSD RAIDframe framework supports several levels of disks arrangement in a single array, see raid(4).
NetBSD's RAIDframe supports RAID levels 0, 1, 5 and 6. However, there are some limitations that this project aims to improve. Firstly, RAID level 1, which is also called mirroring, allows for only two disks in a single mirror pair. Secondly, RAIDframe scrubbing, which involves reading your disks to check for read failures, is not yet supported. Thirdly, RAID level 6, even though included in source, is not well tested and not encouraged to be used.
In this project I have worked on:
Implementation of a RAID level 1 extension called N-way RAID 1 to support multiple disks in a RAIDframe mirror
to support multiple disks in a RAIDframe mirror Implementation of RAID scrubbing
N-way RAID 1
RAID level 1 involves mirroring two disks containing the same data. They are structured as one primary and one parity (secondary). Every write to the raid device writes to all disks in the setup that are alive. Every read from the raid device reads from the disk with the shortest I/O (writes/read to and from the disks) queue. If there's an encountered failure with any of the disks, it reads in degraded mode and hence gets the data from any of the available disks. If all disks fail, I/O aborts.
There is an introduction of a new extension to the RAID 1 setup called N-way RAID1. This involves setting up more than two disk in a RAID 1 array setup where you have one primary disk and multiple secondary disks. This increases redundancy and improves the security of data critical to disk failure that could lead to data loss.
... continue reading