第 11 章 设置自定义卷选项


要设置共享持久性卷,请在其中一个 Red Hat Openshift Container Storage pod 中执行以下命令:

  1. 对于静态置备:执行以下命令来设置卷选项:

    # 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
  2. 要验证,请执行以下命令:

    # 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"
  3. 对于动态置备,可以在存储类文件中的"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/#chap-Documentation-Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-OpenShift_Creating_Persistent_Volumes-Dynamic_Prov

有关为块存储注册存储类的详情请参考 https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/3.11/html-single/operations_guide/#Block_dynamic_prov_vol

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部