Safeguards
Cleaning safeguards
Ironic allows users to list disks which should not be touched during cleaning, choosing root device, etc.
To use this feature, one must have a way of identifying the disks in question - ideally by WWN.
The identifiers are used as hints in a property of the baremetal node called skip_block_devices.
For each disk (or group of disks) to be untouched by Ironic, one must create a dictionary of hints (same hints as for root device hints), for example:
or for multiple disks
The property skip_block_devices is then a list of these dictionaries and can look, for example, as follows:
The command to set the example property above would be
openstack baremetal node set --property 'skip_block_devices'='[{"wwn":"0x5002e10000000001"},{"wwn":"0x5002e10000000001"}]' $NODE
Note, the property needs to be a list of dictionaries even if it contains one dictionary.
For example, the following property applies to all disks larger than 900 GB:
RAID safeguards
To protect logical disks from cleaning, they have to have a volume name specified in the target RAID config, such as:
{
"logical_disks": [
{
"size_gb": 100,
"raid_level": "1",
"controller": "software",
"volume_name": "root"
},
{
"size_gb": "MAX",
"raid_level": "1",
"controller": "software",
"volume_name": "data"
}
]
}
More about target RAID config options can be found in the upstream docs.
Then you can use the volume name to protect the logical disk as follows:
which can be set with a command similar to the one above: