RAID Configuration
RAID can be configured on the node by the user only if multitenancy is enabled, meaning the node has a project uuid assigned as an owner in its properties.
Creating a software RAID configuration
In order to have a software RAID config applied to a node:
- the target_raid_config needs to be defined (the example is for a RAID 0)
openstack baremetal node set --target-raid-config '{"logical_disks": [{"size_gb": 100, "controller": "software", "raid_level": "1"}, {"size_gb": "MAX", "controller":"software", "raid_level": "0"}]}' <BAREMETAL_NODE>
- the cleaning needs to be initiated (e.g. moving a node from manageable to available):
openstack baremetal node provide <BAREMETAL_NODE>
Creating a software RAID with a subset of the disks
Depending on the machine configuration or purpose, we might need to create RAID layouts that don't span across all the disks available.
In our current release, Xena, this can be done in the target RAID configuration
using the field physical_disks
(more info).
Example 1. RAID1 with 2 specific disks
In this example the underlying hardware comes with a set of disks of different sizes. The size of the disks dedicated for the operating system is different, so we can use that as the hint criteria while defining the raid.
The following target_raid_config
payload defines a first volume of 100G and
a second one using the remaining space. The RAID will be configured with two
disks using the filters in physical_disks
:
{
"logical_disks":
[
{
"size_gb": 100,
"controller": "software",
"raid_level": "1",
"physical_disks": [
{"size": "< 3000"},
{"size": "< 3000"},
]
},
{
"size_gb": "MAX",
"controller": "software",
"raid_level": "1",
"physical_disks": [
{"size": "< 3000"},
{"size": "< 3000"},
]
}
]
}
In one line:
$ openstack baremetal node set --target-raid-config '{"logical_disks": [{"size_gb": 100,"controller": "software","raid_level": "1","physical_disks": [{"size": "< 3000"},{"size": "< 3000"}]}, {"size_gb": "MAX","controller": "software","raid_level": "1","physical_disks": [{"size": "< 3000"}, {"size": "< 3000"}]}]}' <node>
Deleting a software RAID configuration
In order to delete the RAID config of a node:
- the target_raid_config needs to be cleared via:
openstack baremetal node set --target-raid-config '{}' <BAREMETAL_NODE>
- the cleaning needs to be initiated (e.g. moving a node from manageable to available):
openstack baremetal node provide <BAREMETAL_NODE>