Create an mdadm software RAID level 10 (raid10)¶
Technology Preview
Warning
The EFI system partition partflags: ['esp']
must be
a physical partition in the main partition table of the disk, not under
LVM or mdadm software RAID.
You can deploy Mirantis OpenStack for Kubernetes (MOSK) on local software-based Redundant Array of Independent Disks (RAID) devices to withstand failure of one device at a time.
Using a custom bare metal host profile, you can configure and create
an mdadm-based software RAID device of type raid10
if you have
an even number of devices available on your servers. At least four
storage devices are required for such RAID device.
During configuration of your custom bare metal host profile as described in
Create a custom bare metal host profile, create an mdadm-based software RAID device
raid10
by describing the mdadm devices under the softRaidDevices
field. For example:
...
softRaidDevices:
- name: /dev/md0
level: raid10
devices:
- partition: sda1
- partition: sdb1
- partition: sdc1
- partition: sdd1
...
The following fields in softRaidDevices
describe RAID devices:
name
Name of the RAID device to refer to throughout the
baremetalhostprofile
.
devices
List of physical devices or partitions used to build a software RAID device. It must include at least four partitions or devices to build a
raid10
device.
level
Type or level of RAID used to create device. Set to
raid10
orraid1
to create a device of the corresponding type.
For the rest of the mdadm RAID parameters, see API Reference: BareMetalHostProfile spec.
Caution
The mdadm RAID devices cannot be created on top of an LVM device.
The following example illustrates an extract of baremetalhostprofile
with data storage on a raid10
device:
...
devices:
- device:
minSize: 60Gi
wipe: true
partitions:
- name: bios_grub1
partflags:
- bios_grub
size: 4Mi
wipe: true
- name: uefi
partflags:
- esp
size: 200Mi
wipe: true
- name: config-2
size: 64Mi
wipe: true
- name: lvm_root
size: 0
wipe: true
- device:
minSize: 60Gi
wipe: true
partitions:
- name: md_part1
partflags:
- raid
size: 40Gi
wipe: true
- device:
minSize: 60Gi
wipe: true
partitions:
- name: md_part2
partflags:
- raid
size: 40Gi
wipe: true
- device:
minSize: 60Gi
wipe: true
partitions:
- name: md_part3
partflags:
- raid
size: 40Gi
wipe: true
- device:
minSize: 60Gi
wipe: true
partitions:
- name: md_part4
partflags:
- raid
size: 40Gi
wipe: true
fileSystems:
- fileSystem: vfat
partition: config-2
- fileSystem: vfat
mountPoint: /boot/efi
partition: uefi
- fileSystem: ext4
mountOpts: rw,noatime,nodiratime,lazytime,nobarrier,commit=240,data=ordered
mountPoint: /
partition: root
- filesystem: ext4
mountPoint: /var
softRaidDevice: /dev/md0
softRaidDevices:
- devices:
- partition: md_root_part1
- partition: md_root_part2
- partition: md_root_part3
- partition: md_root_part4
level: raid10
metadata: "1.2"
name: /dev/md0
...
Warning
When building the raid10
array on top of device partitions,
make sure that only one partition per device is used for a given array.
Although having two partitions located on the same physical device as array members is technically possible, it may lead to data loss if mdadm selects both partitions of the same drive to be mirrored. In such case, redundancy against entire drive failure is lost.
Warning
Any data stored on any device defined in the fileSystems
list can be deleted or corrupted during cluster (re)deployment. It happens
because each device from the fileSystems
list is a part of the
rootfs
directory tree that is overwritten during (re)deployment.
Examples of affected devices include:
A raw device partition with a file system on it
A device partition in a volume group with a logical volume that has a file system on it
An mdadm RAID device with a file system on it
An LVM RAID device with a file system on it
The wipe
field (deprecated) or wipeDevice
structure (recommended
since Container Cloud 2.26.0) have no effect in this case and cannot
protect data on these devices.
Therefore, to prevent data loss, move the necessary data from these file systems to another server beforehand, if required.