3.6. GlusterFS 設定の変更
OpenShift 環境が GlusterFS を使用して永続ストレージボリュームを提供するかどうかを確認する必要があります。GlusterFS を使用している場合は、Business Central の最適なパフォーマンスを確保するために、ストレージクラスの設定を変更して GlusterFS ストレージをチューニングする必要があります。
手順
お使いの環境で 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をリストしないデフォルトストレージクラスが含まれる場合、または結果が空の場合は、変更する必要がありません。変更しない場合は、残りの手順を省略します。デフォルトストレージクラスの設定を YAML ファイルに保存するには、以下のコマンドを実行します。
oc get storageclass <class-name> -o yaml >storage_config.yaml
<class-name>はデフォルトのストレージクラス名に置き換えます。以下に例を示します。oc get storageclass gluster-container -o yaml >storage_config.yaml
storage_config.yamlファイルを編集します。以下のキーがある行を削除します。
-
creationTimestamp -
resourceVersion -
selfLink -
uid
-
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 onBusiness 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
既存のデフォルトストレージクラスを削除するには、以下のコマンドを実行します。
oc delete storageclass <class-name>
<class-name>はデフォルトのストレージクラス名に置き換えます。以下に例を示します。oc delete storageclass gluster-container
新しい設定を使用してストレージクラスを再作成するには、以下のコマンドを実行します。
oc create -f storage_config.yaml