RAIDArrayConfig.
In Talos v1.14, RAIDArrayConfig supports RAID1 arrays.
The resulting array is exposed through a stable by-id path and can be used as an install target, as a block device for user volumes, or by another storage stack.
Talos reconciles RAID from machine configuration documents:
RAIDArrayConfigselects member disks or partitions and creates or extends an MD array.MDArraySpecrecords the desired state derived from configuration.MDArrayStatusreports the observed array device, members, sync state, and errors.
Provision a RAID1 array
The following example creates a RAID1 array nameddata from NVMe disks larger than 100 GiB:
volume.
For whole disks, the expression can also use the disk variable.
The system disk and its partitions are never eligible as members of a data array.
Use selectors that match only the intended member devices.
For production configurations, prefer stable disk identifiers such as serial number, WWID, or symlink over /dev/sd* names:
/dev/disk/by-id/md-name-talos:data.
Configure RAIDArrayConfig
ARAIDArrayConfig document requires:
name: the array name, 1-32 characters, using ASCII letters, digits, hyphens, and underscores.level: the RAID level. Talos v1.14 supportsraid1.provisioning.volumeSelector.match: a CEL expression selecting member disks or partitions.
metadata: MD metadata format, either"1.0"or"1.2". The default is"1.0", which stores metadata at the end of each member and is suitable for bootable arrays. Use"1.2"for data arrays that do not need to be bootable.
talosctl wipe md.
In Talos v1.14 there is no way to shrink an array or remove a failed member device through machine configuration or talosctl.
Narrowing the selector or dropping a member from it does not detach that member, and a failed disk cannot be replaced in place.
The only supported destructive operation is talosctl wipe md, which stops the whole array and clears every member.
To recover from a failed member, wipe the array and provision it again or use alternative means (e.g. talosctl debug).
Boot from a RAID1 array
Talos can install and boot from an MD RAID1 array. This is useful when the Talos system disk itself should be mirrored. A bootable RAID setup needs:- A
RAIDArrayConfigusinglevel: raid1andmetadata: "1.0". - An
UnattendedInstallConfigthat selects the MD array as the install disk. - A
KernelModuleConfigdocument for theraid1kernel module.
/dev/disk/by-id/md-name-talos:boot.
For details on the installer document, see Unattended Install and the UnattendedInstallConfig reference.
For boot arrays, use metadata "1.0".
Metadata "1.2" places the MD superblock near the beginning of the device and is intended for non-boot data arrays.
Use RAID with user volumes
A RAID array can back a Talos user volume by selecting the MD device as the volume disk. For example, after creating an array nameddata, create a user volume from the array device:
UserVolumeConfig reference.
Inspect RAID state
Inspect the desired RAID specs and observed array status:unknown: Talos has not yet determined the array state.waiting: Talos is waiting for enough matching members.rebuilding: the array exists and is syncing or rebuilding.ready: the array exists and is in the expected state.error: provisioning failed; inspect theerrorfield.
Remove a RAID array
First remove theRAIDArrayConfig document from the machine configuration.
If the document remains in configuration, Talos will reconcile the array again.
Then wipe the array with talosctl wipe md: