Container Linux supports composite disk devices such as RAID arrays. If the root filesystem is placed on a composite device, special care must be taken to ensure Container Linux can find and mount the filesystem early in the boot process. GPT partition entries have a partition type GUID that specifies what type of partition it is (e.g. Linux filesystem); Container Linux uses special type GUIDs to indicate that a partition is a component of a composite device containing the root filesystem.
RAID enables multiple disks to be combined into a single logical disk to increase reliability and performance. To create a software RAID array when provisioning a Container Linux system, use the storage.raid
section of a Container Linux Config. RAID components containing the root filesystem must have the type GUID be9067b9-ea49-4f15-b4f6-f36f8c9e1818
. All other RAID arrays must not have that GUID; the Linux RAID partition GUID a19d880f-05fc-4d3b-a006-743f0f84911e
is recommended instead. See the Ignition documentation for more information on setting up RAID for data volumes.
To place the root filesystem on a RAID array:
be9067b9-ea49-4f15-b4f6-f36f8c9e1818
.ROOT
on the RAID array.ROOT
label from the original root filesystem.This Container Linux Config creates partitions on /dev/vdb
and /dev/vdc
that fill each disk, creates a RAID array named root_array
from those partitions, and finally creates the root filesystem on the array. To prevent inadvertent booting from the original root filesystem, /dev/vda9
is reformatted with a blank ext4 filesystem labeled unused
.
Warning: This will erase both /dev/vdb
and /dev/vdc
.
# This config is meant to be consumed by the config transpiler, which will
# generate the corresponding Ignition config. Do not pass this config directly
# to instances of Container Linux.
storage:
disks:
- device: /dev/vdb
wipe_table: true
partitions:
- label: root1
type_guid: be9067b9-ea49-4f15-b4f6-f36f8c9e1818
- device: /dev/vdc
wipe_table: true
partitions:
- label: root2
type_guid: be9067b9-ea49-4f15-b4f6-f36f8c9e1818
raid:
- name: "root_array"
level: "raid1"
devices:
- "/dev/vdb1"
- "/dev/vdc1"
filesystems:
- name: "ROOT"
mount:
device: "/dev/md/root_array"
format: "ext4"
label: "ROOT"
- name: "unused"
mount:
device: "/dev/vda9"
format: "ext4"
wipe_filesystem: true
label: "unused"
{
"ignition": {
"config": {},
"timeouts": {},
"version": "2.1.0"
},
"networkd": {},
"passwd": {},
"storage": {
"disks": [
{
"device": "/dev/vdb",
"partitions": [
{
"label": "root1",
"typeGuid": "be9067b9-ea49-4f15-b4f6-f36f8c9e1818"
}
],
"wipeTable": true
},
{
"device": "/dev/vdc",
"partitions": [
{
"label": "root2",
"typeGuid": "be9067b9-ea49-4f15-b4f6-f36f8c9e1818"
}
],
"wipeTable": true
}
],
"filesystems": [
{
"mount": {
"device": "/dev/md/root_array",
"format": "ext4",
"label": "ROOT"
},
"name": "ROOT"
},
{
"mount": {
"device": "/dev/vda9",
"format": "ext4",
"label": "unused",
"wipeFilesystem": true
},
"name": "unused"
}
],
"raid": [
{
"devices": [
"/dev/vdb1",
"/dev/vdc1"
],
"level": "raid1",
"name": "root_array"
}
]
},
"systemd": {}
}
USR-A
, USR-B
, OEM
, and EFI-SYSTEM
, cannot be placed on a software RAID array./etc/mdadm.conf
cannot be used to configure a RAID array containing the root filesystem.ROOT
partition cannot be reused as a component of a RAID array. A future version of Ignition will support resizing the ROOT
partition and changing its type GUID, allowing it to be used as part of a RAID array.