Configuring Root Filesystem Placement

Flatcar 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 Flatcar 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); Flatcar Linux uses special type GUIDs to indicate that a partition is a component of a composite device containing the root filesystem.

Root on RAID

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 Flatcar 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.

Overview

To place the root filesystem on a RAID array:

Example Container Linux Config

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.

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"

Limitations