第 11 章 设置自定义卷选项
要设置共享持久性卷,请在其中一个 Red Hat Openshift Container Storage pod 中执行以下命令:
对于静态置备:执行以下命令来设置卷选项:
# gluster volume set VOLUME performance.open-behind off # gluster volume set VOLUME performance.write-behind off # gluster volume set VOLUME performance.stat-prefetch off # gluster volume set VOLUME performance.quick-read off # gluster volume set VOLUME performance.strict-o-direct on # gluster volume set VOLUME performance.read-ahead off # gluster volume set VOLUME performance.io-cache off # gluster volume set VOLUME performance.readdir-ahead off要验证,请执行以下命令:
# gluster volume get VOLUME all | grep <performance translator>例如:
# gluster volume get VOLUME all | egrep "performance.stat-prefetch | performance.write-behind | performance.open-behind | performance.quick-read | performance.strict-o-direct | performance.read-ahead | performance.io-cache | performance.readdir-ahead"对于动态置备,可以在存储类文件中的"parameter"下列出卷选项。例如:
parameters: resturl: http://heketi-storage-glusterfs.router.default.svc.cluster.local restuser: admin secretName: heketi-storage-admin-secret secretNamespace: glusterfs volumeoptions: performance.stat-prefetch off performance.write-behind off performance.open-behind off performance.quick-read off performance.strict-o-direct on performance.read-ahead off performance.io-cache off performance.readdir-ahead off
有关为块存储注册存储类的详情请参考 https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/3.11/html-single/operations_guide/#Block_dynamic_prov_vol