第7章 既存の外部の OpenShift Data Foundation クラスターへのファイルおよびオブジェクトストレージの追加


OpenShift Data Foundation が外部モードで設定されている場合に、永続ボリューム要求および Object Bucket Claim (オブジェクトバケット要求) 向けにストレージを提供する方法は複数あります。

  • ブロックストレージ用の永続ボリューム要求は、外部の Red Hat Ceph Storage クラスターから直接提供されます。
  • ファイルストレージ用の永続ボリューム要求は、メタデータサーバー (MDS) を外部の Red Hat Ceph Storage クラスターに追加して提供できます。
  • オブジェクトストレージのオブジェクトバケット要求は、Multicloud Object Gateway を使用するか、Ceph Object Gateway を外部の Red Hat Ceph Storage クラスターに追加して提供できます。

ブロックストレージのみを提供するために最初にデプロイした外部 OpenShift Data Foundation クラスターに、ファイルストレージ (メタデータサーバーを使用) またはオブジェクトストレージ (Ceph Object Gateway を使用)、あるいはその両方を追加するには、次のプロセスを使用します。

前提条件

  • OpenShift Data Foundation 4.20 が OpenShift Container Platform バージョン 4.20 以降にインストールされ、実行されている。また、外部モードの OpenShift Data Foundation Cluster が Ready 状態にある。
  • 外部の Red Hat Ceph Storage クラスターが以下のいずれかまたは両方で設定されている。

    • オブジェクトストレージ用に OpenShift Container Platform クラスターがアクセスできる Ceph Object Gateway (RGW) エンドポイント
    • ファイルストレージ用のメタデータサーバー (MDS) プール
  • 外部の OpenShift Data Foundation クラスターのデプロイメント時に ceph-external-cluster-details-exporter.py スクリプトで使用されるパラメーターを把握している。

手順

  1. 以下のコマンドを使用して Python スクリプト ceph-external-cluster-details-exporter.py の OpenShift Data Foundation バージョンをダウンロードします。

    oc get csv $(oc get csv -n openshift-storage | grep ocs-operator | awk '{print $1}') -n openshift-storage -o jsonpath='{.metadata.annotations.external\.features\.ocs\.openshift\.io/export-script}' | base64 --decode > ceph-external-cluster-details-exporter.py
  2. 更新パーミッションは、外部の Red Hat Ceph Storage クラスターのクライアントノードで ceph-external-cluster-details-exporter.py を実行して、外部の Red Hat Ceph Storage クラスターを制限します。これを行うには、Red Hat Ceph Storage の管理者への問い合わせが必要になる場合があります。

    # python3 ceph-external-cluster-details-exporter.py --upgrade \
    --run-as-user=ocs-client-name \
    --rgw-pool-prefix rgw-pool-prefix
    --run-as-user
    OpenShift Data Foundation クラスターのデプロイメント時に使用されるクライアント名。別のクライアント名が設定されていない場合は、デフォルトのクライアント名 client.healthchecker を使用します。
    --rgw-pool-prefix
    Ceph Object Gateway プールに使用する接頭辞。デフォルトの接頭辞を使用している場合は、省略できます。
  3. 外部の Red Hat Ceph Storage クラスターから設定詳細を生成して保存します。

    1. 外部の Red Hat Ceph Storage クラスターのクライアントノードで ceph-external-cluster-details-exporter.py を実行して、設定の詳細を生成します。

      # python3 ceph-external-cluster-details-exporter.py --rbd-data-pool-name rbd-block-pool-name --monitoring-endpoint ceph-mgr-prometheus-exporter-endpoint --monitoring-endpoint-port ceph-mgr-prometheus-exporter-port --run-as-user ocs-client-name  --rgw-endpoint rgw-endpoint --rgw-pool-prefix rgw-pool-prefix
      --monitoring-endpoint
      オプション。OpenShift Container Platform クラスターから到達可能な、アクティブ mgr およびスタンバイ mgr の IP アドレスのコンマ区切りリストを受け入れます。指定しないと、値が自動的に入力されます。
      --monitoring-endpoint-port
      オプション。--monitoring-endpoint で指定された ceph-mgr Prometheus エクスポーターに関連付けられるポートです。指定しないと、値が自動的に入力されます。
      --run-as-user
      OpenShift Data Foundation クラスターのデプロイメント時に使用されるクライアント名。別のクライアント名が設定されていない場合は、デフォルトのクライアント名 client.healthchecker を使用します。
      --rgw-endpoint
      このパラメーターを指定して OpenShift Data Foundation の Ceph Object Gateway でオブジェクトストレージをプロビジョニングします (任意のパラメーター)。
      --rgw-pool-prefix
      Ceph Object Gateway プールに使用する接頭辞。デフォルトの接頭辞を使用している場合は、省略できます。

      ユーザーパーミッションは、以下のように更新されます。

      caps: [mgr] allow command config
      caps: [mon] allow r, allow command quorum_status, allow command version
      caps: [osd] allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.index
      注記

      Ceph Object Gateway の詳細 (指定されている場合) 以外の全パラメーター (任意の引数を含む) は、OpenShift Data Foundation を外部モードでデプロイした時に使用したものと同じです。

    2. スクリプトの出力を external-cluster-config.json ファイルに保存します。

      以下の出力例では、生成された設定変更を太字で示しています。

      [{"name": "rook-ceph-mon-endpoints", "kind": "ConfigMap", "data": {"data": "xxx.xxx.xxx.xxx:xxxx", "maxMonId": "0", "mapping": "{}"}}, {"name": "rook-ceph-mon", "kind": "Secret", "data": {"admin-secret": "admin-secret", "fsid": "<fs-id>", "mon-secret": "mon-secret"}}, {"name": "rook-ceph-operator-creds", "kind": "Secret", "data": {"userID": "<user-id>", "userKey": "<user-key>"}}, {"name": "rook-csi-rbd-node", "kind": "Secret", "data": {"userID": "csi-rbd-node", "userKey": "<user-key>"}}, {"name": "ceph-rbd", "kind": "StorageClass", "data": {"pool": "<pool>"}}, {"name": "monitoring-endpoint", "kind": "CephCluster", "data": {"MonitoringEndpoint": "xxx.xxx.xxx.xxx", "MonitoringPort": "xxxx"}}, {"name": "rook-ceph-dashboard-link", "kind": "Secret", "data": {"userID": "ceph-dashboard-link", "userKey": "<user-key>"}}, {"name": "rook-csi-rbd-provisioner", "kind": "Secret", "data": {"userID": "csi-rbd-provisioner", "userKey": "<user-key>"}}, {"name": "rook-csi-cephfs-provisioner", "kind": "Secret", "data": {"adminID": "csi-cephfs-provisioner", "adminKey": "<admin-key>"}}, {"name": "rook-csi-cephfs-node", "kind": "Secret", "data": {"adminID": "csi-cephfs-node", "adminKey": "<admin-key>"}}, {"name": "cephfs", "kind": "StorageClass", "data": {"fsName": "cephfs", "pool": "cephfs_data"}}, {"name": "ceph-rgw", "kind": "StorageClass", "data": {"endpoint": "xxx.xxx.xxx.xxx:xxxx", "poolPrefix": "default"}}, {"name": "rgw-admin-ops-user", "kind": "Secret", "data": {"accessKey": "<access-key>", "secretKey": "<secret-key>"}}]
  4. 生成された JSON ファイルをアップロードします。

    1. OpenShift Web コンソールにログインします。
    2. Workloads Secrets をクリックします。
    3. プロジェクトopenshift-storage に設定します。
    4. rook-ceph-external-cluster-details をクリックします。
    5. Actions (⋮) Edit Secret をクリックします。
    6. Browse をクリックして external-cluster-config.json ファイルをアップロードします。
    7. Save をクリックします。

検証手順

  • OpenShift Data Foundation クラスターが正常であり、データが回復性があることを確認するには、Storage Data foundation Storage Systems タブに移動してから、ストレージシステム名をクリックします。

    • Overview Block and File タブで Status カードをチェックして、Storage Cluster に正常であることを示す緑色のチェックマークが表示されていることを確認します。
  • ファイルストレージ用のメタデータサーバーを追加した場合:

    1. Workloads Pods をクリックして、csi-cephfsplugin-* Pod が新規作成され、状態が Running であることを確認します。
    2. Storage Storage Classes をクリックして ocs-external-storagecluster-cephfs ストレージクラスが作成されていることを確認します。
  • オブジェクトストレージ用に Ceph Object Gateway を追加した場合:

    1. Storage Storage Classes をクリックして ocs-external-storagecluster-ceph-rgw ストレージクラスが作成されていることを確認します。
    2. OpenShift Data Foundation クラスターが正常であり、データが回復性があることを確認するには、Storage Data foundation Storage Systems タブに移動してから、ストレージシステム名をクリックします。
    3. Object タブをクリックして、Object Service および Data resiliency に正常であることを示す緑色のチェックマークが表示されていることを確認します。
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る