Configuring Data Storage
Container storage is a component that provides storage for applications. Multiple types of storage are supported. An application component can use any amount of storage.
Container-deployed components support data storage settings.
Scenario
EVS Disks
EVS disks cannot be mounted across AZs and cannot be used by multiple workloads, multiple pods of the same workload, or multiple tasks.
- Choose Container Settings.
- Choose Data Storage > Cloud Storage > Add Cloud Storage and set parameters by referring to Table 2.
Table 2 EVS disks Parameter
Description
Type
Select EVS disk.
The method of using an EVS disk is the same as that of using a traditional disk. However, EVS disks have higher data reliability and I/O throughput and are easier to use. They apply to file systems, databases, or other system software or workloads that require block storage devices.
Allocation Mode
- Manual
Select an EVS disk PersistentVolumeClaim (PVC).
You need to statically create an EVS disk PVC and a storage volume in advance. For details, see Using an Existing EVS Disk Through a Static PV.
The EVS disk PVC and the component instance container must be in the same namespace.
- Automatic
Storage is created automatically. You need to enter the storage capacity.
- If the storage type is EVS disk, select an AZ for creating the EVS disk first.
- Select a storage sub-type.
High I/O: EVS disks that have high I/O and use SAS.
Common I/O: EVS disks that use SATA.
Ultra-high I/O: EVS disks that have ultra-high I/O and use SSD.
- Enter the storage capacity, in the unit of GB. Ensure that the storage capacity quota is not exceeded; otherwise, creation will fail.
Add Container Path
- Set Sub-path and Mount Path to the path to which the data storage is mounted.
For example, if Mount Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.NOTICE:
- Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
- When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
- Set Permission.
- Read-only: allows you only to read data volumes in the application path.
- Read/Write: allows you to modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.
- Manual
- Click OK.
SFS File Systems
- Choose Container Settings.
- Choose Data Storage > Cloud Storage > Add Cloud Storage and set parameters by referring to Table 3.
Table 3 SFS file systems Parameter
Description
Type
Select SFS.
SFS applies to a wide range of scenarios, including media processing, content management, big data, and application analysis.
Allocation Mode
- Manual
You need to statically create an SFS PVC and a storage volume in advance. For details, see Using an Existing SFS File System Through a Static PV.
The SFS PVC and the component instance container must be in the same namespace.
- Automatic
Storage is created automatically. You need to enter the storage capacity.
Add Container Path
- Set Sub-path and Mount Path to the path to which the data storage is mounted.
For example, if Mount Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.NOTICE:
- Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
- When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
- Set Permission.
- Read-only: allows you only to read data volumes in the application path.
- Read/Write: allows you to modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.
- Manual
- Click OK.
OBS Buckets
- Choose Container Settings.
- Choose Data Storage > Cloud Storage > Add Cloud Storage and set parameters by referring to Table 4.
Table 4 OBS buckets Parameter
Description
Type
Select OBS.
Standard and Infrequent Access OBS classes are supported. OBS buckets apply to scenarios such as big data analytics, cloud native application data, static website hosting, and backup/active archiving.
Allocation Mode
- Manual
You need to statically create an OBS PVC and a storage volume in advance. For details, see Using an Existing OBS Bucket Through a Static PV.
The OBS volume and the component instance container must be in the same namespace.
- Automatic
- Set Secret.
Namespace is the namespace of the container where the component instance is located and cannot be changed.
Click Use Existing Secret to select the secret in the namespace of the container where the component instance is located.
You can also create a secret: Enter a new secret name, click Add Key File, and upload the obtained local secret file. For details about how to obtain the secret file, see Access Keys.
- Select a storage sub-type. You can select Standard or Infrequent Access.
- Set Secret.
Add Container Path
- Set Sub-path and Mount Path to the path to which the data storage is mounted.
For example, if Mount Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.NOTICE:
- Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
- When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
- Set Permission.
- Read-only: allows you only to read data volumes in the application path.
- Read/Write: allows you to modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.
- Manual
- Click OK.
SFS Turbo
- Choose Container Settings.
- Choose Data Storage > Cloud Storage > Add Cloud Storage and set parameters by referring to Table 5.
Table 5 SFS Turbo Parameter
Description
Type
Select SFS Turbo.
Standard and Infrequent Access OBS buckets are supported. OBS buckets apply to scenarios such as big data analytics, cloud native application data, static website hosting, and backup/active archiving.
Allocation Mode
- Manual
You need to statically create an SFS Turbo PVC and a storage volume in advance. For details, see Using an Existing SFS Turbo File System Through a Static PV.
The SFS Turbo volume and the component instance container must be in the same namespace.
- Automatic
Select an available file system.
You need to create a file system in advance. For details, see Creating an SFS Turbo File System.
Add Container Path
- Set Sub-path and Mount Path to the path to which the data storage is mounted.
For example, if Mount Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.NOTICE:
- Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
- When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
- Set Permission.
- Read-only: allows you only to read data volumes in the application path.
- Read/Write: allows you to modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.
- Manual
- Click OK.
HostPath
The file or directory of the host is mounted to the component.
- Choose Container Settings.
- Choose Data Storage > Local Disk > Add Local Disk and set parameters by referring to Table 6.
Table 6 HostPath Parameter
Description
Storage Type
Select HostPath.
Host Path
Enter the host path, for example, /etc/hosts.
Container Mounting
- Set Sub-path and Mount Path to the path to which the data storage is mounted.
For example, if Mount Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.NOTICE:
- Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
- When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
- Set Permission.
- Read-only: allows you only to read data volumes in the application path.
- Read/Write: allows you to modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.
- Set Sub-path and Mount Path to the path to which the data storage is mounted.
- Click OK.
EmptyDir
EmptyDir applies to temporary data storage, disaster recovery, and shared running. It will be deleted upon deletion or transfer of application component instances.
- Choose Container Settings.
- Choose Data Storage > Local Disk > Add Local Disk and set parameters by referring to Table 7.
Table 7 EmptyDir Parameter
Description
Storage Type
Select EmptyDir.
EmptyDir
- If Memory is selected, the running speed is improved, but the storage capacity is limited by the memory size. This mode applies to a small amount of data with high requirements on reading and writing efficiency.
- If Memory is not selected, data is stored in disks, which is applicable to a large amount of data with low requirements on reading and writing efficiency.
Container Mounting
- Set Sub-path and Mount Path to the path to which the data storage is mounted.
For example, if Mount Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.NOTICE:
- Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
- When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
- Set Permission.
- Read-only: allows you only to read data volumes in the application path.
- Read/Write: allows you to modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.
- Click OK.
ConfigMap
ServiceStage separates the application codes from configuration files. ConfigMap is used to process application component configuration parameters.
- Choose Container Settings.
- Choose Data Storage > Local Disk > Add Local Disk and set parameters by referring to Table 8.
Table 8 ConfigMap Parameter
Description
Storage Type
Select ConfigMap.
ConfigMap
Select the desired configuration item name.
For details about how to create a configuration item, see Creating a Configuration Item. The configuration item and the component instance container must be in the same namespace.
Container Mounting
Set Sub-path and Mount Path to the path to which the data storage is mounted.
For example, if Mount Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.
When you select ConfigMap, only Read-only is supported. You can only read the data volume in the container path.NOTICE:- Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
- When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
- Click OK.
Secret
The data in the secret is mounted to the specified application component. The content of the secret is user-defined.
- Choose Container Settings.
- Choose Data Storage > Local Disk > Add Local Disk and set parameters by referring to Table 9.
Table 9 Secret Parameter
Description
Storage Type
Select Secret.
Secret
Select the desired secret name.
For details about how to create a secret, see Creating a Secret. The secret and the component instance container must be in the same namespace.
Container Mounting
Set Sub-path and Mount Path to the path to which the data storage is mounted.
For example, if Mount Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.
When you select Secret, only Read-only is supported. You can only read the data volume in the container path.NOTICE:- Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
- When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
- Click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot