oadp du-pv

Important: IBM Cloud Pak® for Data Version 4.7 will reach end of support (EOS) on 31 July, 2025. For more information, see the Discontinuance of service announcement for IBM Cloud Pak for Data Version 4.X.

Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.7 reaches end of support. For more information, see Upgrading IBM Software Hub in the IBM Software Hub Version 5.1 documentation.

Tech preview Get an estimated volume usage size to allocate sufficient storage for backups.

Extended description

Required role
You must have the Cluster administrator role in Cloud Pak for Data.

Before you run the du-pv command, the cluster administrator must install the cpdbr-agent to the Red Hat® OpenShift® cluster. For more information, see Installing the cpdbr-agent.

You must also export the following environment variable before you run the du-pv command.

export CPDBR_ENABLE_FEATURES=volume-util

The estimated usage size that is returned by du-pv includes only PVCs that are bound and mounted by pods.

Syntax

cpd-cli oadp du-pv

Arguments

The du-pv command has no arguments.

Options

Option Description
--include-namespaces The namespaces in which to run du-pv exec-hooks.
Status
Optional.
Syntax
--include-namespaces=<project-name1,project-name2,...>
Default value
All namespaces, which includes the Cloud Pak for Data operators (${PROJECT_CPD_INST_OPERATORS}), Cloud Pak for Data instance (${PROJECT_CPD_INST_OPERANDS}), and its tethered namespaces if any (${PROJECT_CPD_INSTANCE_TETHERED_LIST}).
Valid values
Any valid project names. (Comma-separated string array.)

Table 1: Command options

Examples

Note: The following examples use the recommended installation environment variables.

Use a script to create environment variables with the correct values for your environment. For more information, see Best practice: Setting up install variables.

cpd-cli oadp du-pv --include-namespaces=${PROJECT_CPD_INST_OPERANDS}

This command might return information that is similar to the following example.


PVC NAME    				NAMESPACE    		VOLUME       					STATUS		MOUNTED 	CAPACITY 	USED		CREATED AT 		ACCESS MODES	STORAGE CLASS 
 
export-zen-minio-0 			cpd-instance 		pvc-45080d04-fd88-4612-8963-37c456f7be27 	Bound 		true 		10Gi 		130Mi 		25 May 23 11:16 PDT 	RWO 		managed-nfs-storage 
export-zen-minio-1	 		cpd-instance 		pvc-4b0630d7-2ea2-4485-bdd7-c55cce26c6ec 	Bound 		true 		10Gi 		130Mi 		25 May 23 11:16 PDT 	RWO 		managed-nfs-storage 
export-zen-minio-2 			cpd-instance 		pvc-d64ea3ae-3435-4d30-a7e7-b30eb03f5b56 	Bound 		true 		10Gi 		130Mi 		25 May 23 11:16 PDT 	RWO 		managed-nfs-storage 
ibm-zen-cs-mongo-backup   		cpd-instance 		pvc-e1ac51ce-94ef-47d5-993c-9de48bb5d9e4 	Bound 		false		20Gi 		-     		25 May 23 11:44 PDT 	RWO 		managed-nfs-storage 
ibm-zen-objectstore-backup-pvc   	cpd-instance 		pvc-2d1d4ab2-4e51-4701-a864-9f946eafdd83 	Bound 		false		20Gi 		-     		25 May 23 11:22 PDT 	RWO 		managed-nfs-storage 
mongodbdir-icp-mongodb-0  		cpd-instance 		pvc-84013df3-3b46-4432-988f-d951271d1d42 	Bound 		true 		20Gi 		432Mi 		25 May 23 11:38 PDT 	RWO 		managed-nfs-storage 
mongodbdir-icp-mongodb-1  		cpd-instance 		pvc-a1e509f7-ee08-48e3-b0ed-95182f3d3158 	Bound 		true 		20Gi 		448Mi 		25 May 23 11:40 PDT 	RWO 		managed-nfs-storage 
mongodbdir-icp-mongodb-2  		cpd-instance 		pvc-17bc7875-c203-44a9-a608-a5120b9a04cf 	Bound 		true 		20Gi 		444Mi 		25 May 23 11:40 PDT 	RWO 		managed-nfs-storage 
zen-metastore-edb-1			cpd-instance 		pvc-9087d25e-d54e-4823-b8a6-6a5ad6a55de7 	Bound 		true 		10Gi 		588Mi 		25 May 23 11:18 PDT 	RWO 		managed-nfs-storage 
zen-metastore-edb-2			cpd-instance 		pvc-185de0d4-c6c9-4944-8a51-5e5626b34f06 	Bound 		true 		10Gi 		604Mi 		25 May 23 11:18 PDT 	RWO 		managed-nfs-storage 
 
Total estimated volume usage size: 3Gi

If --include-namespaces is not specified, the du-pv command includes the ${PROJECT_CPD_INST_OPERANDS} namespace and its tethered namespaces.

To uninstall the cpdbr-agent, run the following command.

cpd-cli oadp uninstall --component=cpdbr-agent