Setting the storage class for caching in Data Virtualization
Block storage in a persistent volume (PV) is the default storage type for data caching in Data Virtualization, but you can change the storage type to object storage.
The use of object storage for caching is available only as an early preview. Do not use this feature in production environments. In production environments, continue to use the default type, block storage in a persistent volume (PV), for data caching in Data Virtualization.
Before you begin
To complete this task, you must be the user that provisioned this service instance or have the Data Virtualization Admin role. For more information, see Managing users in Data Virtualization.
About this task
When you provision an instance of Data Virtualization, block storage in a persistent volume (PV) is the default storage type for caching event data. However, you can, use object storage, such as Amazon S3 storage or IBM Cloud Object Storage, instead.
You can change the storage type for caching on a running Data Virtualization instance at any time after the instance is provisioned or upgraded. When you use object storage for caching, you own and manage the object storage. For example, you create your own buckets for caches and you manage and rotate credentials if they need to be changed.
Determining the current storage type for caching
Before you change the storage type, verify the type that is used by the caching pod:
- Run the following command to find the storage
type:
oc describe pod -l role=dvcaching | grep -i objectIf the results show empty values for
OBJECTSTORE_BUCKETandOBJECTSTORE_ENDPOINT, the storage type is block storage. If the values are not empty, then the storage type is object storage and the storage uses the bucket name and endpoint values that are specified.For example, in the following results, the empty values indicate that the storage type is block storage:oc describe pod -l role=dvcaching | grep -i object OBJECTSTORE_BUCKET: OBJECTSTORE_ENDPOINT:
Changing the type of object storage from another type of object storage or from block storage
- Run the following command to edit the Big SQL Custom Resource
(CR):
oc edit bigsql db2u-dv - Add the object storage credentials to the CR in the format that is shown in the following
example for Amazon S3 object
storage:
dvCachingObjectStorageCredential: name: <ANY NAME> s3: accessKey: value: <ACCESS KEY> bucketName: <PRE EXISTING BUCKET NAME> disabledSSL: false endpoint: <END POINT> pathStyleAccess: true secretKey: value: <SECRET KEY> - Save the changes and wait for the caching pod to restart.
Changing to block storage from object storage
- Run the following command to edit the Big SQL Custom Resource (CR):
oc edit bigsql db2u-dv - Delete the
dvCachingObjectStorageCredentialsection from the CR. - Save the changes and wait for the caching pod to restart.
oc describe pod -l role=dvcaching | grep -i object
OBJECTSTORE_BUCKET:
OBJECTSTORE_ENDPOINT:
Pre-existing caches are deleted and re-created. New caches use
block storage.