3.6. GlusterFS 設定の変更

OpenShift 環境が GlusterFS を使用して永続ストレージボリュームを提供するかどうかを確認する必要があります。GlusterFS を使用している場合は、Business Central の最適なパフォーマンスを確保するために、ストレージクラスの設定を変更して GlusterFS ストレージをチューニングする必要があります。

手順

  1. お使いの環境で GlusterFS が使用されているかどうかを確認するには、以下のコマンドを実行します。

    oc get storageclass

    この結果で、(default) マーカーが、glusterfs をリストするストレージクラスにあるかどうかを確認します。たとえば、以下の結果では、デフォルトのストレージクラスが gluster-container であり、glusterfs をリストします。

    NAME              PROVISIONER                       AGE
    gluster-block     gluster.org/glusterblock          8d
    gluster-container (default) kubernetes.io/glusterfs 8d

    結果に、glusterfs をリストしないデフォルトストレージクラスが含まれる場合、または結果が空の場合は、変更する必要がありません。変更しない場合は、残りの手順を省略します。

  2. デフォルトストレージクラスの設定を YAML ファイルに保存するには、以下のコマンドを実行します。

    oc get storageclass <class-name> -o yaml >storage_config.yaml

    <class-name> はデフォルトのストレージクラス名に置き換えます。以下に例を示します。

    oc get storageclass gluster-container -o yaml >storage_config.yaml
  3. storage_config.yaml ファイルを編集します。

    1. 以下のキーがある行を削除します。

      • creationTimestamp
      • resourceVersion
      • selfLink
      • uid
    2. Business Central を、高可用性設定がない単一の Pod としてのみ使用する予定の場合は、volumeoptions キーが含まれる行に、以下のオプションを追加します。

      features.cache-invalidation on
      performance.nl-cache on

      以下に例を示します。

      volumeoptions: client.ssl off, server.ssl off, features.cache-invalidation on, performance.nl-cache on

    3. Business Central を高可用性設定で使用する予定の場合は、volumeoptions キーが含まれる行に、以下のオプションを追加します。

      features.cache-invalidation on
      nfs.trusted-write on
      nfs.trusted-sync on
      performance.nl-cache on
      performance.stat-prefetch off
      performance.read-ahead off
      performance.write-behind off
      performance.readdir-ahead off
      performance.io-cache off
      performance.quick-read off
      performance.open-behind off
      locks.mandatory-locking off
      performance.strict-o-direct on

      以下に例を示します。

      volumeoptions: client.ssl off, server.ssl off, features.cache-invalidation on, nfs.trusted-write on, nfs.trusted-sync on, performance.nl-cache on, performance.stat-prefetch off, performance.read-ahead off, performance.write-behind off, performance.readdir-ahead off, performance.io-cache off, performance.quick-read off, performance.open-behind off, locks.mandatory-locking off, performance.strict-o-direct on

  4. 既存のデフォルトストレージクラスを削除するには、以下のコマンドを実行します。

    oc delete storageclass <class-name>

    <class-name> はデフォルトのストレージクラス名に置き換えます。以下に例を示します。

    oc delete storageclass gluster-container
  5. 新しい設定を使用してストレージクラスを再作成するには、以下のコマンドを実行します。

    oc create -f storage_config.yaml