PersistentVolumes Management

PVC

General

A PVC (PersistentVolumeClaim) is used to persistently store the data of a workload, so that the data is retained when a pod is restarted or deleted.ZStack Zaku provides two PVC types based on distributed storage: exclusive disk and shared disk.

Creating PVC

In the ZStack Zaku main menu, select Container Orchestration > PVC Management > PVC. On the PVC page, click Create PVC and the Create PVC page is displayed.

You can refer to the following example to enter the required information:
  • Name: set the name of the PVC. Naming rules: the length is limited to 1-50 characters, the input can contain only lowercase letters, digits and hyphens (-), and it must start with a lowercase letter and end with a digit or a lowercase letter.
  • storage class: click Select storage class and select the storage class (StorageClass) used to create the pvc based on the storage type, reclaim policy, and whether expansion is required.
    Note:
    • A storage class is a configuration template used in Kubernetes to dynamically create pvcs. It defines the properties of the pvc, the creation policy and the required storage plugins.
    • Storage classes are created and managed by the administrator. If no storage class is available, contact the administrator.
  • access mode: select an access mode supported by the selected storage class. The access modes are described below:
    • ReadWriteOnce: read-write by a single node only.
    • ReadWriteMany: read-write by multiple nodes.
    • ReadOnlyMany: read-only by multiple nodes.
    Note: Local storage supports only ReadWriteOnce. Check the access mode again after changing the storage class.
  • Capacity: set the capacity of the PVC. Unit: Gi, Ti.

Managing PVCs

In the ZStack Zaku main menu, click Container Orchestration > PVC Management > PVC to enter the PVC page.

PVCs support the following operations:
Operation Description
Create PVC Create a new PVC.
Resize PVC Expand the capacity of the pvc.
Note:
  • If the pvc has been mounted and the expanded capacity does not take effect for a long time, try restarting the pods to which it is mounted.
  • Expanding a pvc requires that the storage class used by the pvc allow expansion.
  • For local storage, LVM mode supports pvc expansion, whereas Device mode does not.
Update Yaml Update the pvc using YAML.
PVC details Go to the PVC details page to view the basic information, usage statistics and events of the PVC.
Delete PVC Delete the pvc from the cluster.
Note:
  • Deleting a pvc deletes its PVC object. Whether the corresponding persistent volume (PV) and storage resources are retained depends on the reclaim policy of the storage class: Delete automatically reclaims them, whereas Retain preserves the persistent volume and data for the administrator to handle manually.
  • A mounted pvc cannot be deleted.