Discover local disks
LocalVolumeDiscovery inventories unused block devices on cluster nodes and writes one LocalVolumeDiscoveryResult object per node. Use the result to choose device paths for a LocalVolume or filters for a LocalVolumeSet.
Discovery does not create PersistentVolumes, StorageClasses, or filesystems. A device with status.state: Available is free for provisioning. It is not a PersistentVolume.
TOC
PrerequisitesCheck whether discovery already existsCreate a LocalVolumeDiscoveryInspect discovery resultsNext stepsPrerequisites
- Alauda Container Platform Local Disk Provisioner is installed. See Install.
- You can run
kubectlagainst the cluster.
Check whether discovery already exists
After Alauda Container Platform Local Disk Provisioner is installed, the platform creates a LocalVolumeDiscovery named auto-discover-devices in acp-storage when Alauda Container Platform Storage Essentials is also installed and no LocalVolumeDiscovery exists yet.
On a control plane node:
If auto-discover-devices is listed, do not create another object. Inspect the results in the next section. To limit which nodes are scanned, edit spec.nodeSelector on that object.
Create a LocalVolumeDiscovery
Create a LocalVolumeDiscovery only when none exists in acp-storage.
- Optional. Nodes that run discovery. Get hostnames from
kubectl get node. If omitted, discovery runs on every node. - Optional. Tolerations passed to the discovery DaemonSet.
operator: Existsmatches every taint.
Inspect discovery results
On a control plane node:
Example output:
Each selected node gets a LocalVolumeDiscoveryResult. Inspect devices on one node:
Use status.discoveredDevices[].deviceID (a /dev/disk/by-id/... path) as the stable path in a LocalVolume. Do not use path values such as /dev/sdb or /dev/disk/by-path/.... Those names can change after a node reboot.
status.discoveredDevices[].status.state is one of:
Devices in the list are non-removable, not read-only, not mounted, not boot disks, and have no child partitions. Discovery still does not create volumes.
Next steps
- Provision listed paths with LocalVolume.
- Provision matching disks with LocalVolumeSet.