Storage Management
Storageclass
General
A storageclass (StorageClass) is a configuration template used in Kubernetes to dynamically create PVCs. It defines the properties of a PVC, the creation policy, and the required storage plug-in.
Creating Storageclasses
In the ZStack Zaku main menu, click . On the Storageclass page, click Create Storageclass and the Create Storageclass page is displayed.
The following two creation methods are supported:
- Create from YAML: enter the YAML for the storage class and click OK to create it.
- Create from Form: create a storage class based on a local storage pool by configuring the following parameters:
- Name: set the name of the storage class. The name must be 1 to 50 characters long and contain only lowercase letters, digits, and hyphens (-). It must start with a lowercase letter and end with a lowercase letter or digit.
- Storage Type: Local Storage.
Note: A local pvc is bound to its node and cannot be shared or migrated across nodes. Local storage is not available for integrated clusters. - Storage Pool: click Select Storage Pool and select a local storage pool based on the storage mode and disk medium.
Note:
- Storage pools that are abnormal, have an unknown status, or are expanding cannot be used to create storage classes.
- LVM mode supports pvc expansion; Device mode does not.
- File System: select the file system for pvcs created using this storage class. The default is ext4; xfs is also available. ext4 is suitable for most scenarios, while xfs is suitable for large files and highly concurrent read/write operations.
- Reclaim Policy: select how the persistent volume and its storage resources are handled after the persistent volume claim (PVC) is deleted. The default is Delete.
- Delete: automatically reclaim the corresponding persistent volume and storage resources.
- Retain: preserve the corresponding persistent volume and data for the administrator to handle manually.
Note: Storage classes created using the form use delayed binding (WaitForFirstConsumer): binding is completed when a pod first uses the pvc. The access mode is ReadWriteOnce, which allows read/write access from a single node only.
Managing Storageclasses
In the ZStack Zaku main menu, click to enter the Storageclass page.
| Operation | Description |
|---|---|
| Create Storageclass | Create a new storageclass. |
| Update Yaml | Update the storage class using YAML. Note: For storage classes of the Local Storage type, you can only view the YAML. Updating is not supported. |
| View Yaml | View the YAML configuration of a storage class of the Local Storage type. |
| storage class details | Click a storage class name to view basic information such as its storage type, provisioner, reclaim policy, and volume binding mode. For local storage classes, you can also view the file system. On the pvc tab, view the associated pvcs. For pvc management operations, see Managing PVCs. |
| Delete Storageclass | Delete the storageclass. Note:
|
Local Storage
General
Local storage organizes local disks on cluster nodes into storage pools and provides persistent storage for workloads through storage classes.
Local storage supports the following two storage modes:
- LVM: groups disks on a node into a volume group and allocates storage space based on the capacity requested by each pvc. This mode supports pvc expansion.
- Device: allocates an entire disk exclusively to one pvc. This mode does not support pvc expansion.
Note:
- The admin user and administrators can create and manage local storage. Local storage is not available for integrated clusters.
- Each node has independent storage capacity. A local pvc is bound to its node and cannot be shared or migrated across nodes.
- Local storage does not provide multiple data replicas or automatic fault recovery. A node or disk failure may prevent the associated services from accessing data.
Creating Local Storage Pools
In the ZStack Zaku main menu, click . On the Local Storage page, select a cluster and click Create Local Storage Pool. The Create Local Storage Pool page is displayed.
Configure the following settings:
- Name: set the name of the local storage pool. The name must be 1 to 50 characters long and contain only lowercase letters, digits, and hyphens (-). It must start with a lowercase letter and end with a lowercase letter or digit. The name must be unique within the cluster and cannot be changed after creation.
- Description: optional. Enter information about the local storage pool, up to 256 characters.
- Storage Mode: select how local disks are allocated. LVM and Device are supported. LVM allocates space based on the capacity requested by each pvc; Device allocates an entire disk exclusively to one pvc.
Note: If a volume group name conflict is reported, change the storage pool name. If you need to remove the existing volume group, first make sure that its data no longer needs to be retained. - Disk Medium: select HDD or SSD. All disks in a storage pool must use the same medium. HDDs are suitable for capacity-oriented storage, while SSDs are suitable for scenarios that require low latency and high read/write performance.
Note: A cluster can have only one Device local storage pool for each disk medium. - Nodes and Disks: click Select Nodes and Disks, expand a node, select the disks to add to the storage pool, and click OK. You can select multiple nodes and multiple disks on each node.
Note:
- Each node must have the compute node role, be in the Running state, and have a Node Storage Management Status of Normal.
- Select unused non-system disks that match the selected disk medium and are in the Normal state. If no disks are available, select another node or change the disk medium.
- After changing the storage mode or disk medium, select the nodes and disks again.
After completing the configuration, click OK to create the local storage pool.
Managing Local Storage
In the ZStack Zaku main menu, click to enter the Local Storage page, and select a cluster.
Local storage supports the following operations:
| Operation | Description |
|---|---|
| Create Local Storage Pool | Create a local storage pool. For details, see Creating Local Storage Pools. |
| Expand | Add nodes and disks to the storage pool. Click Expand, select one of the following expansion methods, and select the resources to add under Nodes and Disks:
Note:
|
| Local Storage Pool Details | Click a storage pool name to open its details page and view the following information:
|
| Delete | Delete the local storage pool and remove its configuration and storage information from the associated disks. Note:
|
