Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #287 from flatcar/sayan/upddate-butane-storage-raid
Browse files Browse the repository at this point in the history
setup/storage/raid.md: Migrate CLC docs to Butane
  • Loading branch information
sayanchowdhury authored Mar 20, 2023
2 parents 1050459 + a6965a6 commit 5504967
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions docs/setup/storage/raid.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Flatcar Container Linux supports composite disk devices such as RAID arrays. If

## 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 Container Linux system, use the `storage.raid` section of a [Container Linux Config][cl-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](https://coreos.com/ignition/docs/latest/examples.html#create-a-raid-enabled-data-volume) for more information on setting up RAID for data volumes.
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 Container Linux system, use the `storage.raid` section of [Butane Config][butane-configs]. 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](https://coreos.github.io/ignition/examples/#create-a-raid-enabled-data-volume) for more information on setting up RAID for data volumes.

### Overview

Expand All @@ -22,13 +22,15 @@ To place the root filesystem on a RAID array:
* Create a filesystem labeled `ROOT` on the RAID array.
* Remove the `ROOT` label from the original root filesystem.

### Example Container Linux Config
### Example Butane 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][partition-table], `/dev/vda9` is reformatted with a blank ext4 filesystem labeled `unused`.
This Butane 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][partition-table], `/dev/vda9` is reformatted with a blank ext4 filesystem labeled `unused`.

**Warning**: This will erase both `/dev/vdb` and `/dev/vdc`.

```yaml
variant: flatcar
version: 1.0.0
storage:
disks:
- device: /dev/vdb
Expand All @@ -48,17 +50,13 @@ storage:
- "/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"
- device: "/dev/md/root_array"
format: "ext4"
label: "ROOT"
- device: "/dev/vda9"
format: "ext4"
wipe_filesystem: true
label: "unused"
```
### Limitations
Expand All @@ -68,5 +66,5 @@ storage:
* `/etc/mdadm.conf` cannot be used to configure a RAID array containing the root filesystem.
* Since Ignition cannot modify the type GUID of existing partitions, the default `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.

[cl-config]: ../../provisioning/cl-config
[butane-configs]: ../../provisioning/config-transpiler
[partition-table]: ../../reference/developer-guides/sdk-disk-partitions/#partition-table

0 comments on commit 5504967

Please sign in to comment.