Mirantis Container Cloud (MCC) becomes part of Mirantis OpenStack for Kubernetes (MOSK)!
Starting with MOSK 25.2, the MOSK documentation set covers all product layers, including MOSK management (formerly Container Cloud). This means everything you need is in one place. Some legacy names may remain in the code and documentation and will be updated in future releases. The separate Container Cloud documentation site will be retired, so please update your bookmarks for continued easy access to the latest content.
Provisioning failure due to device naming issues in a bare metal host profile¶
During a bare metal host provisioning, transition to each stage implies the
host reboot. This may cause device name issues if a device is configured
using the by_name device identifier.
In Linux, assignment of device names, for example, /dev/sda,
to physical disks can change, especially in systems with multiple
disks or when hardware configuration changes. For example:
If you add or remove a hard drive or change the boot order, the device names can shift.
If the system uses hardware with additional disk array controllers, such as
RaidControllersin theJBODmode, device names can shift during reboot. This can lead to unintended consequences and potential data loss if your file systems are not mounted correctly.The
/dev/sdapartition on the first boot may become/dev/sdbon the second boot. Consequently, your file system may not be provisioned as expected, leading to errors during disk formatting and assembling.
Linux recommends using unique identifiers (UUIDs) or labels for device
identification in /etc/fstab. These identifiers are more stable and ensure
that the defined devices are mounted regardless of the naming changes.
Therefore, to prevent device naming issues during a bare metal host
provisioning, instead of the by_name identifier, Mirantis recommends using
the workBy parameter along with device labels or filters such as
minSize and maxSize. These device settings ensure a successful
bare metal host provisioning with /dev/disk/by-uuid/<UUID> or
/dev/disk/by-label/<label> in /etc/fstab. For details on workBy,
see BareMetalHostProfile spec.
Overview of the device naming logic in a bare metal host profile¶
To manage physical devices, the bare metal provider uses the following entities:
- The
BareMetalHostProfileobject Object created by an operator with description of the required file-system schema on a node. For details, see Create a custom bare metal host profile.
- The
- The
status.hardware.storagefields of theBareMetalHostobject Initial description of physical disks that is discovered only once during a bare metal host inspection.
- The
- The
status.hostInfo.storagefields of theLCMMachineobject Current state of physical disks during life cycle of
MachineandLCMMachineobjects.
- The
The default device naming workflow during management of BareMetalHost and
BareMetalHostProfile objects is as follows:
An operator creates the
BareMetalHostInventoryandBareMetalHostCredentialobjects.Note
Before update of the management cluster to 2.29.0 (Cluster release 16.4.0), instead of
BareMetalHostInventory, use theBareMetalHostobject. For details, see BareMetalHost resource.Caution
While the Cluster release of the management cluster is 16.4.0,
BareMetalHostInventoryoperations are allowed tom:kaas@management-adminonly. This limitation is lifted once the management cluster is updated to the Cluster release 16.4.1 or later.The
baremetal-operatorservice inspects the objects.The operator creates or reviews an existing
BareMetalHostProfileobject using thestatus.hardware.storagefields of theBareMetalHostobject associated with the createdBareMetalHostInventoryobject. For details, see Create a custom bare metal host profile.The operator creates a
Machineobject and maps it to the relatedBareMetalHostandBareMetalHostProfileobjects. For details, see Deploy a machine to a specific bare metal host.The
baremeral-providerservice starts processingBareMetalHostProfileand searching for suitable hardware disks to build the internalAnsibleExtraobject configuration. During the building process:The
bmh:hardware:storagelist is sorted using thehardwaredetails-storage-sort-termrule. For details, see Add a bare metal host using CLI and BareMetalHost metadata.The first suitable disk for an item in the
bmhp.spec.deviceslist is selected.
The cleanup and provisioning stage of
BareMetalHoststarts:During provisioning, the selection order described in
bmhp.workByapplies. For details, see Create MOSK host profiles.This logic ensures that an exact
by_idname is taken from the discovery stage, as opposed toby_namethat can be changed during transition from the inspection to provisioning stage.After provisioning finishes, the target system
/etc/fstabis generated usingUUIDs.
Note
For the /dev/disk/by-id mapping in Ceph, see
Addressing storage devices since MOSK 25.2.