Skip to content

Commit 1e9dda2

Browse files
authored
Merge pull request #55472 from amolnar-rh/TELCODOCS-1110
2 parents aab9aee + 53e8c34 commit 1e9dda2

File tree

34 files changed

+1485
-11
lines changed

34 files changed

+1485
-11
lines changed

_attributes/common-attributes.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,6 @@ endif::[]
160160
//ifdef::openshift-origin[]
161161
//:openshift-networking: OKD Networking
162162
//endif::[]
163+
// logical volume manager storage
164+
:lvms-first: Logical volume manager storage (LVM Storage)
165+
:lvms: LVM Storage

_topic_maps/_topic_map.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,18 +1432,24 @@ Topics:
14321432
File: persistent-storage-flexvolume
14331433
- Name: Persistent storage using GCE Persistent Disk
14341434
File: persistent-storage-gce
1435-
- Name: Persistent storage using hostPath
1436-
File: persistent-storage-hostpath
14371435
- Name: Persistent Storage using iSCSI
14381436
File: persistent-storage-iscsi
1439-
- Name: Persistent storage using local volumes
1440-
File: persistent-storage-local
14411437
- Name: Persistent storage using NFS
14421438
File: persistent-storage-nfs
14431439
- Name: Persistent storage using Red Hat OpenShift Data Foundation
14441440
File: persistent-storage-ocs
14451441
- Name: Persistent storage using VMware vSphere
14461442
File: persistent-storage-vsphere
1443+
- Name: Persistent storage using local storage
1444+
Dir: persistent_storage_local
1445+
Distros: openshift-enterprise,openshift-origin
1446+
Topics:
1447+
- Name: Persistent storage using local volumes
1448+
File: persistent-storage-local
1449+
- Name: Persistent storage using hostPath
1450+
File: persistent-storage-hostpath
1451+
- Name: Persistent storage using LVM Storage
1452+
File: persistent-storage-using-lvms
14471453
- Name: Using Container Storage Interface (CSI)
14481454
Dir: container_storage_interface
14491455
Distros: openshift-enterprise,openshift-origin

installing/installing_with_agent_based_installer/preparing-an-agent-based-installed-cluster-for-mce.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The following procedure is partially automated and requires manual steps after t
1212
== Prerequisites
1313
* You have read the following documentation:
1414
** link:https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.6/html/multicluster_engine/multicluster_engine_overview[multicluster engine for Kubernetes].
15-
** xref:../../storage/persistent_storage/persistent-storage-local.adoc#persistent-storage-using-local-volume[Persistent storage using local volumes].
15+
** xref:../../storage/persistent_storage/persistent_storage_local/persistent-storage-local.adoc#persistent-storage-using-local-volume[Persistent storage using local volumes].
1616
** xref:../../scalability_and_performance/ztp_far_edge/ztp-deploying-far-edge-clusters-at-scale.adoc#about-ztp_ztp-deploying-far-edge-clusters-at-scale[Using ZTP to provision clusters at the network far edge].
1717
** xref:../../installing/installing_with_agent_based_installer/preparing-to-install-with-agent-based-installer.adoc#preparing-to-install-with-agent-based-installer[Preparing to install with the Agent-based Installer].
1818
** xref:../../installing/disconnected_install/index.adoc#installing-mirroring-disconnected-about[About disconnected installation mirroring].
@@ -27,4 +27,4 @@ include::modules/preparing-an-inital-cluster-deployment-for-mce-connected.adoc[l
2727
[role="_additional-resources"]
2828
.Additional resources
2929

30-
* xref:../../storage/persistent_storage/persistent-storage-local.adoc#persistent-storage-using-local-volume[The Local Storage Operator]
30+
* xref:../../storage/persistent_storage/persistent_storage_local/persistent-storage-local.adoc#persistent-storage-using-local-volume[The Local Storage Operator]

migrating_from_ocp_3_to_4/planning-migration-3-4.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Review the following storage changes to consider when transitioning from {produc
8484

8585
Local storage is only supported by using the Local Storage Operator in {product-title} {product-version}. It is not supported to use the local provisioner method from {product-title} 3.11.
8686

87-
For more information, see xref:../storage/persistent_storage/persistent-storage-local.adoc#persistent-storage-using-local-volume[Persistent storage using local volumes].
87+
For more information, see xref:../storage/persistent_storage/persistent_storage_local/persistent-storage-local.adoc#persistent-storage-using-local-volume[Persistent storage using local volumes].
8888

8989
[discrete]
9090
==== FlexVolume persistent storage
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Module included in the following assemblies:
2+
//
3+
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="lvms-preface-sno-ran_{context}"]
7+
= Deploying {lvms} on {sno} clusters
8+
9+
You can deploy {lvms} on a {sno} bare-metal or user-provisioned infrastructure cluster and configure it to dynamically provision storage for your workloads.
10+
11+
{lvms} creates a volume group using all the available unused disks and creates a single thin pool with a size of 90% of the volume group.
12+
The remaining 10% of the volume group is left free to enable data recovery by expanding the thin pool when required.
13+
You might need to manually perform such recovery.
14+
15+
You can use persistent volume claims (PVCs) and volume snapshots provisioned by {lvms} to request storage and create volume snapshots.
16+
17+
{lvms} configures a default overprovisioning limit of 10 to take advantage of the thin-provisioning feature.
18+
The total size of the volumes and volume snapshots that can be created on the {sno} clusters is 10 times the size of the thin pool.
19+
20+
You can deploy {lvms} on {sno} clusters using one of the following:
21+
22+
* {rh-rhacm-first}
23+
* {product-title} Web Console
24+
25+
[id="lvms-deployment-requirements-for-sno-ran_{context}"]
26+
== Requirements
27+
28+
Before you begin deploying {lvms} on {sno} clusters, ensure that the following requirements are met:
29+
30+
* You have installed {rh-rhacm-first} on an {product-title} cluster.
31+
* Every managed {sno} cluster has dedicated disks that are used to provision storage.
32+
33+
Before you deploy {lvms} on {sno} clusters, be aware of the following limitations:
34+
35+
* You can only create a single instance of the `LVMCluster` custom resource (CR) on an {product-title} cluster.
36+
* You can make only a single `deviceClass` entry in the `LVMCluster` CR.
37+
* When a device becomes part of the `LVMCluster` CR, it cannot be removed.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
// Module included in the following assemblies:
2+
//
3+
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="lvms-creating-lvms-cluster_{context}"]
7+
= Creating Logical Volume Manager cluster
8+
9+
You can create a Logical Volume Manager cluster after you install {lvms}.
10+
11+
{product-title} supports additional worker nodes for {sno} clusters on bare-metal user-provisioned infrastructure.
12+
{lvms} detects and uses the additional worker nodes when the new nodes show up.
13+
In case you need to set a node filter for the additional worker nodes, you can use the YAML view while creating the cluster.
14+
15+
[IMPORTANT]
16+
====
17+
This node filter matching is not the same as the pod label matching.
18+
====
19+
20+
.Prerequisites
21+
22+
* You installed {lvms} from the OperatorHub.
23+
24+
.Procedure
25+
26+
. In the {product-title} Web Console, click *Operators → Installed Operators* to view all the installed Operators.
27+
+
28+
Ensure that the *Project* selected is `openshift-storage`.
29+
30+
. Click on *LVM Storage*, and then click *Create LVMCluster* under *LVMCluster*.
31+
. In the *Create LVMCluster* page, select either *Form view* or *YAML view*.
32+
. Enter a name for the cluster.
33+
. Click *Create*.
34+
. Optional: To add a node filter, click *YAML view* and specify the filter in the `nodeSelector` section:
35+
+
36+
[source,yaml]
37+
----
38+
apiVersion: lvm.topolvm.io/v1alpha1
39+
kind: LVMCluster
40+
metadata:
41+
name: my-lvmcluster
42+
spec:
43+
storage:
44+
deviceClasses:
45+
- name: vg1
46+
thinPoolConfig:
47+
name: thin-pool-1
48+
sizePercent: 90
49+
overprovisionRatio: 10
50+
nodeSelector:
51+
nodeSelectorTerms:
52+
- matchExpressions:
53+
- key: app
54+
operator: In
55+
Values:
56+
- test1
57+
----
58+
59+
. Optional: To edit the local device path of the disks, click *YAML view* and specify the device path in the `deviceSelector` section:
60+
+
61+
[source,yaml]
62+
----
63+
spec:
64+
storage:
65+
deviceClasses:
66+
- name: vg1
67+
deviceSelector:
68+
paths:
69+
- /dev/disk/by-path/pci-0000:87:00.0-nvme-1
70+
- /dev/disk/by-path/pci-0000:88:00.0-nvme-1
71+
thinPoolConfig:
72+
name: thin-pool-1
73+
sizePercent: 90
74+
overprovisionRatio: 10
75+
----
76+
77+
.Verification Steps
78+
79+
. Click *Storage -> Storage Classes* from the left pane of the {product-title} Web Console.
80+
81+
. Verify that the `lvms-<device-class-name>` storage class is created with the `LVMCluster` creation. By default, `vg1` is the `device-class-name`.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Module included in the following assemblies:
2+
//
3+
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="lvms-creating-volume-clones-in-single-node-openshift_{context}"]
7+
= Creating volume clones in {sno}
8+
9+
You create a clone of a volume to make a point-in-time copy of the data.
10+
A persistent volume claim (PVC) cannot be cloned with a different size.
11+
12+
[IMPORTANT]
13+
====
14+
The cloned PVC has write access.
15+
====
16+
17+
.Prerequisites
18+
19+
* You ensured that the PVC is in `Bound` state. This is required for a consistent snapshot.
20+
* You ensured that the `StorageClass` is the same as that of the source PVC.
21+
22+
.Procedure
23+
24+
. Identify the storage class of the source PVC.
25+
. To create a volume clone, save the following YAML to a file with a name such as `lvms-vol-clone.yaml`:
26+
+
27+
.Example YAML to clone a volume
28+
[source,yaml]
29+
----
30+
apiVersion: v1
31+
kind: PersistentVolumeClaim
32+
Metadata:
33+
name: lvm-block-1-clone
34+
Spec:
35+
storageClassName: lvms-vg1
36+
dataSource:
37+
name: lvm-block-1
38+
kind: PersistentVolumeClaim
39+
accessModes:
40+
- ReadWriteOnce
41+
volumeMode: Block
42+
Resources:
43+
Requests:
44+
storage: 2Gi
45+
----
46+
47+
. Create the policy in the same namespace as the source PVC by running the following command:
48+
+
49+
[source,terminal]
50+
----
51+
# oc create -f lvms-vol-clone.yaml
52+
----
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Module included in the following assemblies:
2+
//
3+
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="lvms-creating-volume-snapshots-in-single-node-openshift_{context}"]
7+
= Creating volume snapshots in {sno}
8+
9+
You can create volume snapshots based on the available capacity of the thin pool and the overprovisioning limits.
10+
{lvms} creates a `VolumeSnapshotClass` with the `lvms-<deviceclass-name>` name.
11+
12+
.Prerequisites
13+
14+
* You ensured that the persistent volume claim (PVC) is in `Bound` state. This is required for a consistent snapshot.
15+
* You stopped all the I/O to the PVC before taking the snapshot.
16+
17+
.Procedure
18+
19+
. Log in to the {sno} for which you need to run the `oc` command.
20+
. Save the following YAML to a file with a name such as `lvms-vol-snapshot.yaml`.
21+
+
22+
.Example YAML to create a volume snapshot
23+
[source,yaml]
24+
----
25+
apiVersion: snapshot.storage.k8s.io/v1
26+
kind: VolumeSnapshot
27+
metadata:
28+
name: lvm-block-1-snap
29+
spec:
30+
volumeSnapshotClassName: lvms-vg1
31+
source:
32+
persistentVolumeClaimName: lvm-block-1
33+
----
34+
35+
. Create the snapshot by running the following command in the same namespace as the PVC:
36+
+
37+
[source,terminal]
38+
----
39+
# oc create -f lvms-vol-snapshot.yaml
40+
----
41+
42+
A read-only copy of the PVC is created as a volume snapshot.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Module included in the following assemblies:
2+
//
3+
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="lvms-deleting-cloned-volumes-in-single-node-openshift_{context}"]
7+
= Deleting cloned volumes in {sno}
8+
9+
You can delete cloned volumes.
10+
11+
.Procedure
12+
13+
* To delete the cloned volume, delete the cloned PVC by running the following command:
14+
+
15+
[source,terminal]
16+
----
17+
# oc delete pvc <clone_pvc_name> -n <namespace>
18+
----
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Module included in the following assemblies:
2+
//
3+
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="lvms-deleting-volume-snapshots-in-single-node-openshift_{context}"]
7+
= Deleting volume snapshots in {sno}
8+
9+
You can delete volume snapshots resources and persistent volume claims (PVCs).
10+
11+
.Procedure
12+
13+
. Delete the volume snapshot resource by running the following command:
14+
+
15+
[source,terminal]
16+
----
17+
# oc delete volumesnapshot <volume_snapshot_name> -n <namespace>
18+
----
19+
+
20+
[NOTE]
21+
====
22+
When you delete a persistent volume claim (PVC), the snapshots of the PVC are not deleted.
23+
====
24+
25+
. To delete the restored volume snapshot, delete the PVC that was created to restore the volume snapshot by running the following command:
26+
+
27+
[source,terminal]
28+
----
29+
# oc delete pvc <pvc_name> -n <namespace>
30+
----

0 commit comments

Comments
 (0)