// Module included in the following assemblies:
//
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc

:_mod-docs-content-type: CONCEPT
[id="validation-rules-for-device-discovery-policy_{context}"]
= Validation rules for device discovery policy

[role="_abstract"]
To ensure your storage cluster deploys successfully and avoids misconfiguration errors, the validating webhook enforces strict rules when you create or update an `LVMCluster` custom resource.

Creation::
* If you define one device class without paths, a webhook warning appears. Avoid the default `Static` policy in production. Set `deviceDiscoveryPolicy` explicitly.
* If multiple device classes are defined, every device class must specify device paths. Auto-discovery without paths is not allowed with many device classes. The cluster cannot determine which devices belong to which class.
* If the `deviceDiscoveryPolicy` is empty and paths are missing, a webhook warning appears. Administrators must define the policy explicitly.

Updates::
No specific update restrictions apply to the `deviceDiscoveryPolicy` field. You can change it at any time.

The following table shows how the device discovery policy feature interacts with other features:

.Device discovery policy feature interactions
[cols="1,2",options="header"]
|===
|Feature |Interaction

|`forceWipeDevicesAndDestroyAllData`
|Works independently of the discovery policy. Devices are wiped before being added to the volume group, regardless of how they were discovered.

|Node selector
|Works independently. The discovery policy applies only to the set of devices found on nodes matching the selector.
|===
