Create TopoLVM Local Storage Class

TopoLVM is an LVM-based local storage solution that provides simple, easy-to-maintain, and high-performance local storage services suitable for scenarios such as databases and middleware. Before using it, you need to create a TopoLVM storage class.

Once the Persistent Volume Claim (PVC) is bound to the storage class, the platform dynamically creates persistent volumes on the nodes based on the Persistent Volume Claim for business applications to use.

Background Information

Advantages of Use

  • Compared to remote storage (e.g., NFS shared storage): TopoLVM-type storage is located locally on the node, offering better IOPS and throughput performance, as well as lower latency.

  • Compared to hostPath (e.g., local-path): Although both are local storage on the node, TopoLVM allows for flexible scheduling of container groups to nodes with sufficient available resources, avoiding issues where container groups cannot start due to insufficient resources.

  • TopoLVM supports automatic volume expansion by default. After modifying the required storage quota in the Persistent Volume Claim, the expansion can be completed automatically without restarting the container group.

Use Cases

  • When only temporary storage is needed, such as for development and debugging.

  • When there are high storage I/O requirements, such as real-time indexing.

Constraints and Limitations

Please try to use local storage only for applications where data replication and backup at the application layer can be realized, such as MySQL. Avoid data loss due to the lack of data persistence guarantee from local storage.

Learn more

Deploy Volume Plugin

After clicking deploy, on the newly opened page configure local storage.

Create Storage Class

  1. Go to Platform Management.

  2. In the left navigation bar, click Storage Management > Storage Classes.

  3. Click Create Storage Class.

  4. Select TopoLVM, then click Next.

  5. Configure the storage class parameters as described below.

    Note: The following content is presented as a form example; you may also choose to create it using YAML.

    ParameterDescription
    NameThe name of the storage class, which must be unique within the current cluster.
    Display NameA name that can help you identify or filter it, such as a Chinese description of the storage class.
    Device ClassThe device class is a way to categorize storage devices in TopoLVM, with each device class corresponding to a group of storage devices with similar characteristics. If there are no special requirements, use the Automatically Assigned device class.
    File System
    • XFS is a high-performance journaling file system well-suited for handling parallel I/O workloads, supporting large file handling and smooth data transfer.
    • EXT4 is a journaling file system under Linux that provides extent file storage and supports large file handling, with a maximum file system capacity of 1 EiB and a maximum file size of 16 TiB.
    Reclamation PolicyThe reclamation policy for persistent volumes.
    • Delete: The bound persistent volume will also be deleted along with the PVC.
    • Retain: The bound persistent volume will remain even if the PVC is deleted.
    Access ModeReadWriteOnce (RWO): Can be mounted as read-write by a single node.
    PVC ReconstructionSupports PVC reconstruction across nodes. When enabled, the Reconstruction Wait Time must be configured. When the node hosting the PVC created using this storage class fails, the PVC will be automatically rebuilt on other nodes after the wait time to ensure business continuity.
    Note:
    • The rebuilt PVC does not contain the original data.
    • Please ensure that the number of storage nodes is greater than the number of application instance replicas, or it will affect PVC reconstruction.
    Allocated ProjectsPersistent volume claims of this type can only be created in specific projects.
    If no project is currently allocated, the project can also be updated later.
  6. After confirming that the configuration information is correct, click the Create button.

Follow-up Actions

Once everything is ready, you can notify the developers to use the TopoLVM features. For example, create a Persistent Volume Claim and bind it to the TopoLVM storage class in the Storage > Persistent Volume Claims page of the container platform.