2.5. Red Hat Ceph Storage クラスターの電源をオフにして再起動
systemctl コマンドおよび Ceph Orchestrator の 2 つの方法を使用して、Red Hat Ceph Storage クラスターの電源をオフにして再起動できます。クラスターの電源をオフにして再起動する方法のいずれかを選択できます。
2.5.1. systemctl コマンドを使用したクラスターの電源オフおよび再起動 リンクのコピーリンクがクリップボードにコピーされました!
systemctl コマンドアプローチを使用して、Red Hat Ceph Storage クラスターの電源をオフにして再起動できます。このアプローチは、Linux によるサービス停止方法に従います。
前提条件
- 稼働中の Red Hat Ceph Storage クラスターがある。
- ルートレベルのアクセス。
手順
Red Hat Ceph Storage クラスターの電源オフ
- クライアントがこのクラスターおよびその他のクライアント上の Block Device イメージ RADOS Gateway - Ceph Object Gateway を使用しないようにします。
Cephadm シェルにログインします。
例
[root@host01 ~]# cephadm shell次のステップに進む前に、クラスターの状態が正常な状態 (
Health_OKおよびすべての PG がactive+clean) である必要があります。Ceph Monitor または OpenStack コントローラーノードなどのクライアントキーリングを持つホストでceph statusを実行し、クラスターが正常であることを確認します。例
[ceph: root@host01 /]# ceph -sCeph File System (
CephFS) を使用する場合は、CephFSクラスターを停止します。構文
ceph fs set FS_NAME max_mds 1 ceph fs fail FS_NAME ceph status ceph fs set FS_NAME joinable false例
[ceph: root@host01 /]# ceph fs set cephfs max_mds 1 [ceph: root@host01 /]# ceph fs fail cephfs [ceph: root@host01 /]# ceph status [ceph: root@host01 /]# ceph fs set cephfs joinable falsenooutフラグ、norecoverフラグ、norebalanceフラグ、nobackfillフラグ、nodownフラグ、およびpauseフラグを設定します。Ceph Monitor または OpenStack コントローラーなどのクライアントキーリングを持つノードで以下を実行します。例
[ceph: root@host01 /]# ceph osd set noout [ceph: root@host01 /]# ceph osd set norecover [ceph: root@host01 /]# ceph osd set norebalance [ceph: root@host01 /]# ceph osd set nobackfill [ceph: root@host01 /]# ceph osd set nodown [ceph: root@host01 /]# ceph osd set pause重要上記の例は、OSD ノード内のサービスと各 OSD を停止する場合のみであり、各 OSD ノードで繰り返す必要があります。
- MDS および Ceph Object Gateway ノードがそれぞれ専用のノード上にある場合は、それらの電源をオフにします。
デーモンの systemd ターゲットを取得します。
例
[root@host01 ~]# systemctl list-units --type target | grep ceph ceph-0b007564-ec48-11ee-b736-525400fd02f8.target loaded active active Ceph cluster 0b007564-ec48-11ee-b736-525400fd02f8 ceph.target loaded active active All Ceph clusters and servicesクラスター FSID を含むターゲットを無効にします。
例
[root@host01 ~]# systemctl disable ceph-0b007564-ec48-11ee-b736-525400fd02f8.target Removed "/etc/systemd/system/multi-user.target.wants/ceph-0b007564-ec48-11ee-b736-525400fd02f8.target". Removed "/etc/systemd/system/ceph.target.wants/ceph-0b007564-ec48-11ee-b736-525400fd02f8.target".ターゲットを停止します。
例
[root@host01 ~]# systemctl stop ceph-0b007564-ec48-11ee-b736-525400fd02f8.targetこれにより、停止する必要があるホスト上のすべてのデーモンが停止されます。
ノードをシャットダウンします。
例
[root@host01 ~]# shutdown Shutdown scheduled for Wed 2024-03-27 11:47:19 EDT, use 'shutdown -c' to cancel.- クラスターのすべてのノードに対して上記の手順を繰り返します。
Red Hat Ceph Storage クラスターのリブート
- ネットワーク機器を使用した場合、Ceph ホストまたはノードの電源を入れる前に、ネットワーク機器の電源が入り、安定していることを確認します。
- 管理ノードの電源をオンにします。
すべてのデーモンを実行するには、systemd ターゲットを有効にします。
例
[root@host01 ~]# systemctl enable ceph-0b007564-ec48-11ee-b736-525400fd02f8.target Created symlink /etc/systemd/system/multi-user.target.wants/ceph-0b007564-ec48-11ee-b736-525400fd02f8.target/etc/systemd/system/ceph-0b007564-ec48-11ee-b736-525400fd02f8.target. Created symlink /etc/systemd/system/ceph.target.wants/ceph-0b007564-ec48-11ee-b736-525400fd02f8.target /etc/systemd/system/ceph-0b007564-ec48-11ee-b736-525400fd02f8.target. systemd ターゲットを起動します。
例
[root@host01 ~]# systemctl start ceph-0b007564-ec48-11ee-b736-525400fd02f8.target- すべてのノードが起動するのを待ちます。すべてのサービスが稼働中であり、ノード間の接続に問題がないことを確認します。
nooutフラグ、norecoverフラグ、norebalanceフラグ、nobackfillフラグ、nodownフラグ、およびpauseフラグの設定を解除します。Ceph Monitor または OpenStack コントローラーなどのクライアントキーリングを持つノードで以下を実行します。例
[ceph: root@host01 /]# ceph osd unset noout [ceph: root@host01 /]# ceph osd unset norecover [ceph: root@host01 /]# ceph osd unset norebalance [ceph: root@host01 /]# ceph osd unset nobackfill [ceph: root@host01 /]# ceph osd unset nodown [ceph: root@host01 /]# ceph osd unset pauseCeph File System (
CephFS) を使用する場合は、joinableフラグをtrueに設定して、CephFSクラスターをバックアップします。構文
ceph fs set FS_NAME joinable true例
[ceph: root@host01 /]# ceph fs set cephfs joinable true
検証
-
クラスターの状態が正常であることを確認します (
Health_OK、およびすべての PG がactive+clean)。Ceph Monitor や OpenStack コントローラーceph statusノードなどのクライアントキーリングを持つノードで実行し、クラスターが正常であることを確認します。
例
[ceph: root@host01 /]# ceph -s