Create a StorageClass: TopoLVM
TopoLVM is a local storage solution based on LVM that provides simple, easy-to-maintain, and high-performance local storage services for scenarios such as databases and middleware. Before using TopoLVM, you need to create TopoLVM StorageClasses.
After binding StorageClasses in PV declaration (PVC, PersistentVolumeClaim), the platform will dynamically create PV on the node for business applications to use.
Context
Advantages
-
Compared to remote storage (such as NFS shared storage): TopoLVM storage, which is local to the node, has better IOPS and throughput performance, as well as lower latency.
-
Compared to hostPath (such as local-path): both are local storage on the node, but TopoLVM can flexibly schedule Pods to nodes with sufficient available resources, avoiding the inability to start Pods due to resource shortages.
-
TopoLVM supports volume auto-scaling by default. After modifying the storage quota required by the PV declaration, the Pods can automatically scale without the need for a restart.
Usage scenarios
-
Only temporary storage is needed, such as for development and debugging purposes.
-
When there is a high demand for storage IO, such as real-time indexing.
Constraints and limitations
Please use local storage only in applications that can achieve application-level data replication and backup, such as MySQL. Avoid data loss caused by the lack of data persistence guarantees from local storage.
Deployment volume plugin
After clicking on the deployment, configure local storage in the newly opened page.
Create a StorageClasse
-
In the left navigation bar, click Storage > StorageClasses.
-
Click Create a StorageClass.
-
Select TopoLVM and click Next.
-
Configure the parameters related to StorageClasses according to the following instructions.
Note: The following content is provided as an example using a form. You can also choose to use the YAML creation method by selecting
> YAML Create.Parameter Description Name The name of the StorageClass. Must be unique within the current cluster. Display Name A name that helps you identify or filter, such as the Chinese description of StorageClasses. Device Class The way to classify storage devices in TopoLVM. Each device class corresponds to a group of storage devices with the same characteristics. If there are no special requirements, you can use the device class of Auto-assign in the cluster. File System - XFS is a high-performance journaling file system. It is good at handling parallel I/O workloads, supports handling large files, and can smoothly transfer data.
- EXT4 is a journaling file system for Linux, which provides extent file storage and supports handling large files. The file system capacity can reach 1 EiB, and the supported file size can reach 16 TiB.
Recycle Strategy The recycling strategy of PV. - Delete: When deleting the PV claim, the bound PV will also be deleted.
- Retain: Even if the PV claim is deleted, the bound PV will still be retained.
Access Mode Single-node read-write (RWO): Can be mounted by one node in read-write mode. PVC Rebuilding Supports PVC rebuilding across nodes. After enabling, you need to configure the rebuilding waiting time. When the node where the PVC created using this StorageClass fails, the PVC will be automatically rebuilt on other nodes after the rebuilding waiting time to ensure uninterrupted business.
Note:- The rebuilt PVC does not contain the original data.
- Before using this feature, please ensure that the number of storage nodes is greater than the number of upper-layer application instances, otherwise it will affect PVC rebuilding.
Allocate Project This type of PV claim can only be created in specific projects.
If no project is allocated temporarily, you can also Update the project later. -
After confirming that the configuration information is correct, click the Create button.
What’s next
Once everything is ready, developers can be notified to use the TopoLVM feature. For example, create PV declarations and bind TopoLVM StorageClasses on the Storage > PV Declarations page in the container platform.