-
Notifications
You must be signed in to change notification settings - Fork 1.8k
STOR-402: Auto-discovery and auto-provisioning in LSO #26275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// storage/persistent_storage/persistent-storage-local.adoc | ||
|
||
[id="local-storage-discovery_{context}"] | ||
= Automating discovery and provisioning for local storage devices | ||
|
||
The Local Storage Operator automates local storage discovery and provisioning. With this feature, you can simplify installation when dynamic provisioning is not available during deployment, such as with bare metal, VMware, or AWS store instances with attached devices. | ||
|
||
[IMPORTANT] | ||
==== | ||
Automatic discovery and provisioning is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. | ||
|
||
For more information about the support scope of Red Hat Technology Preview features, see https://access.redhat.com/support/offerings/techpreview/. | ||
==== | ||
|
||
Use the following procedure to automatically discover local devices, and to automatically provision local volumes for selected devices. | ||
|
||
.Prerequisites | ||
* You have cluster administrator permissions. | ||
|
||
* You have installed the Local Storage Operator. | ||
|
||
* You have attached local disks to {product-title} nodes. | ||
|
||
* You have access to the {product-title} web console and the `oc` command-line interface (CLI). | ||
|
||
.Procedure | ||
|
||
. To enable automatic discovery of local devices from the web console: | ||
|
||
.. In the _Administrator_ perspective, navigate to *Operators* -> *Installed Operators* and click on the *Local Volume Discovery* tab. | ||
|
||
.. Click *Create Local Volume Discovery*. | ||
|
||
.. Select either *All nodes* or *Select nodes*, depending on whether you want to discover available disks on all or specific nodes. | ||
+ | ||
[NOTE] | ||
==== | ||
Only worker nodes are available, regardless of whether you filter using *All nodes* or *Select nodes*. | ||
==== | ||
+ | ||
.. Click *Create*. | ||
|
||
A local volume discovery instance named `auto-discover-devices` is displayed. | ||
|
||
. To display a continuous list of available devices on a node: | ||
|
||
bobfuru marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
.. Log in to the {product-title} web console. | ||
|
||
.. Navigate to *Compute* -> *Nodes*. | ||
|
||
.. Click the node name that you want to open. The "Node Details" page is displayed. | ||
|
||
.. Select the *Disks* tab to display the list of the selected devices. | ||
+ | ||
bobfuru marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
The device list updates continuously as local disks are added or removed. You can filter the devices by name, status, type, model, capacity, and mode. | ||
|
||
. To automatically provision local volumes for the discovered devices from the web console: | ||
|
||
.. Navigate to *Operators* -> *Installed Operators* and select *Local Storage* from the list of Operators. | ||
|
||
.. Select *Local Volume Set* -> *Create Local Volume Set*. | ||
|
||
.. Enter a volume set name and a storage class name. | ||
|
||
.. Choose *All nodes* or *Select nodes* to apply filters accordingly. | ||
+ | ||
[NOTE] | ||
==== | ||
Only worker nodes are available, regardless of whether you filter using *All nodes* or *Select nodes*. | ||
==== | ||
+ | ||
.. Select the disk type, mode, size, and limit you want to apply to the local volume set, and click *Create*. | ||
+ | ||
A message displays after several minutes, indicating that the "Operator reconciled successfully." | ||
|
||
bobfuru marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
[start=3] | ||
. Alternatively, to provision local volumes for the discovered devices from the CLI: | ||
|
||
.. Create an object YAML file to define the local volume set, such as `local-volume-set.yaml`, as shown in the following example: | ||
+ | ||
[source,yaml] | ||
---- | ||
apiVersion: local.storage.openshift.io/v1alpha1 | ||
kind: LocalVolumeSet | ||
metadata: | ||
name: example-autodetect | ||
spec: | ||
nodeSelector: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/hostname | ||
operator: In | ||
values: | ||
- worker-0 | ||
- worker-1 | ||
storageClassName: example-storageclass <1> | ||
volumeMode: Filesystem | ||
fstype: ext4 | ||
maxDeviceCount: 10 | ||
deviceInclusionSpec: | ||
deviceTypes: <2> | ||
- disk | ||
- part | ||
deviceMechanicalProperty: | ||
- NonRotational | ||
minSize: 10G | ||
maxSize: 100G | ||
models: | ||
- SAMSUNG | ||
- Crucial_CT525MX3 | ||
vendors: | ||
- ATA | ||
- ST2000LM | ||
---- | ||
+ | ||
<1> Determines the storage class that is created for persistent volumes that are provisioned from discovered devices. | ||
+ | ||
<2> When using the local volume set feature, the Local Storage Operator does not support the use of logical volume management (LVM) devices. | ||
|
||
.. Create the local volume set object: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc apply -f local-volume-set.yaml | ||
---- | ||
|
||
.. Verify that the local persistent volumes were dynamically provisioned based on the storage class: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc -n get pv | ||
---- | ||
+ | ||
.Example output | ||
[source,terminal] | ||
---- | ||
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE | ||
local-pv-1cec77cf 100Gi RWO Delete Available example-storageclass 88m | ||
local-pv-2ef7cd2a 100Gi RWO Delete Available example-storageclass 82m | ||
local-pv-3fa1c73 100Gi RWO Delete Available example-storageclass 48m | ||
---- | ||
|
||
[NOTE] | ||
==== | ||
Results are deleted after they are removed from the node. Symlinks must be manually removed. | ||
==== | ||
bobfuru marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.