-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Bob Furu <bfuru@redhat.com>
- Loading branch information
1 parent
b9be4f4
commit 886caee
Showing
4 changed files
with
176 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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: | ||
|
||
.. 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. | ||
+ | ||
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." | ||
|
||
[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. | ||
==== |
This file contains 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 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 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