Compression Support
Provides support for compressing files, typically on some schedule with cronjobs.
The files will not be compressed until a cronjob runs. As files are created or modified, they
will be uncompressed until the job runs again. When the storage class is created with
compression: true, the fileset created in the IBM Spectrum® Scale filesystem will have a name appended to it such as -COMPRESSZcsi. The compression field is
optional, and by default is "false" meaning no files will be compressed within that PV.
A sample storage class with compression enabled:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ibm-spectrum-scale-compression
parameters:
version: "2"
volBackendFs: fs0
compression: "true" # Default: false
provisioner: spectrumscale.csi.ibm.com
reclaimPolicy: DeletePerform the following steps to create a cronjob:
- Create compression policy
file.
$ echo "RULE 'FSETCOMPRESSION' MIGRATE COMPRESS('z') WHERE FILESET_NAME LIKE '%COMPRESSZcsi%'" > zcompress.policy $ chmod 400 zcompress.policy - Create a crontab entry on the owning cluster of the filesystem to run compression
policy.
$ crontab -e # insert line 0 0 * * * /usr/lpp/mmfs/bin/mmapplypolicy <filesystemName> -P zcompress.policy -I yes # save and quit