// HACKER NEWS — CYBERSECURITY
NetBSD GSoC 2026 Improving RAIDframe
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.
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.
For example, in a five way RAID1 setup, it will involve one primary and 4 parity/secondary disks.
So every disk write will attempt to write to all five disks.
Every disk read will attempt to read from the primary disk or the secondary disk with the shortest I/O queue.
Five disks can be configured in a 5 way RAID 1 setup for redundancy
using raidctl(8) with the command below:
where /dev/raid1 is the device file for the raid device, and N is the level.
In the order of the disks, the first listed is considered the primary
and the rest are considered secondary.
The /dev/dk* are the NetBSD disk partition (wedge) driver used for the independent disks, see dk(4) and dkctl(8).
This, by default, sets up a 128 sectors per stripe unit and a first in first out queuing algorithm and a max queue length of 100.