4.7. ベアメタルデプロイメント用の Ceph Monitor のリカバリー
すべてのモニターが Red Hat Ceph Storage クラスターでダウンし、ceph -s
コマンドが想定どおりに実行されていない場合には、monmaptool
コマンドを使用してモニターを回復できます。monmaptool
コマンドは、Ceph モニターストアをデーモンのキーリングファイルから再デプロイします。
以下の手順は、ベアメタルの Red Hat Ceph Storage デプロイメントにのみ使用します。コンテナー化された Red Hat Ceph Storage デプロイメントについては、ナレッジベースアーティクル MON recovery procedure for Red Hat Ceph Storage containerized deployment when all the three mon are down. を参照してください。
前提条件
- ベアメタル によりデプロイされた Red Hat Ceph Storage クラスター
- すべてのノードへの root レベルのアクセス。
- すべての Ceph モニターがダウンしている。
手順
- モニターノードにログインします。
一般ユーザーとして OSD ノードにアクセスできない場合は、モニターノードから、公開鍵のペアを OSD ノードにコピーします。
SSH キーペアを生成し、デフォルトのファイル名を受け入れ、パスフレーズを空のままにします。
例
ssh-keygen
[root@mons-1 ~]# ssh-keygen
Copy to Clipboard Copied! 公開鍵をストレージクラスター内の すべての OSD ノードにコピーします。
例
ssh-copy-id root@osds-1 ssh-copy-id root@osds-2 ssh-copy-id root@osds-3
[root@mons-1 ~]# ssh-copy-id root@osds-1 [root@mons-1 ~]# ssh-copy-id root@osds-2 [root@mons-1 ~]# ssh-copy-id root@osds-3
Copy to Clipboard Copied!
すべての OSD ノードで OSD デーモンサービスを停止します。
例
sudo systemctl stop ceph-osd\*.service ceph-osd.target
[root@osds-1 ~]# sudo systemctl stop ceph-osd\*.service ceph-osd.target
Copy to Clipboard Copied! すべての OSD ノードからクラスターマップを収集するには、リカバリーファイルを作成し、スクリプトを実行します。
リカバリーファイルを作成します。
例
touch recover.sh
[root@mons-1 ~]# touch recover.sh
Copy to Clipboard Copied! 以下の内容をファイルに追加します。OSD_NODES は、Red Hat Ceph Storage クラスター内のすべての OSD ノードの IP アドレスまたはホスト名に置き換えてください。
Syntax
-------------------------------------------------------------------------- NOTE: The directory names specified by 'ms', 'db', and 'db_slow' must end with a trailing / otherwise rsync will not operate properly. -------------------------------------------------------------------------- ms=/tmp/monstore/ db=/root/db/ db_slow=/root/db.slow/ mkdir -p $ms $db $db_slow -------------------------------------------------------------------------- NOTE: Replace the contents inside double quotes for 'osd_nodes' below with the list of OSD nodes in the environment. -------------------------------------------------------------------------- osd_nodes="OSD_NODES_1 OSD_NODES_2 OSD_NODES_3..." for osd_node in $osd_nodes; do echo "Operating on $osd_node" rsync -avz --delete $ms $osd_node:$ms rsync -avz --delete $db $osd_node:$db rsync -avz --delete $db_slow $osd_node:$db_slow ssh -t $osd_node <<EOF for osd in /var/lib/ceph/osd/ceph-*; do ceph-objectstore-tool --type bluestore --data-path \$osd --op update-mon-db --no-mon-config --mon-store-path $ms if [ -e \$osd/keyring ]; then cat \$osd/keyring >> $ms/keyring echo ' caps mgr = "allow profile osd"' >> $ms/keyring echo ' caps mon = "allow profile osd"' >> $ms/keyring echo ' caps osd = "allow *"' >> $ms/keyring else echo WARNING: \$osd on $osd_node does not have a local keyring. fi done EOF rsync -avz --delete --remove-source-files $osd_node:$ms $ms rsync -avz --delete --remove-source-files $osd_node:$db $db rsync -avz --delete --remove-source-files $osd_node:$db_slow $db_slow done -------------------------------------------------------------------------- End of script ## --------------------------------------------------------------------------
-------------------------------------------------------------------------- NOTE: The directory names specified by 'ms', 'db', and 'db_slow' must end with a trailing / otherwise rsync will not operate properly. -------------------------------------------------------------------------- ms=/tmp/monstore/ db=/root/db/ db_slow=/root/db.slow/ mkdir -p $ms $db $db_slow -------------------------------------------------------------------------- NOTE: Replace the contents inside double quotes for 'osd_nodes' below with the list of OSD nodes in the environment. -------------------------------------------------------------------------- osd_nodes="OSD_NODES_1 OSD_NODES_2 OSD_NODES_3..." for osd_node in $osd_nodes; do echo "Operating on $osd_node" rsync -avz --delete $ms $osd_node:$ms rsync -avz --delete $db $osd_node:$db rsync -avz --delete $db_slow $osd_node:$db_slow ssh -t $osd_node <<EOF for osd in /var/lib/ceph/osd/ceph-*; do ceph-objectstore-tool --type bluestore --data-path \$osd --op update-mon-db --no-mon-config --mon-store-path $ms if [ -e \$osd/keyring ]; then cat \$osd/keyring >> $ms/keyring echo ' caps mgr = "allow profile osd"' >> $ms/keyring echo ' caps mon = "allow profile osd"' >> $ms/keyring echo ' caps osd = "allow *"' >> $ms/keyring else echo WARNING: \$osd on $osd_node does not have a local keyring. fi done EOF rsync -avz --delete --remove-source-files $osd_node:$ms $ms rsync -avz --delete --remove-source-files $osd_node:$db $db rsync -avz --delete --remove-source-files $osd_node:$db_slow $db_slow done -------------------------------------------------------------------------- End of script ## --------------------------------------------------------------------------
Copy to Clipboard Copied! ファイルに実行可能なパーミッションを指定します。
例
chmod 755 recover.sh
[root@mons-1 ~]# chmod 755 recover.sh
Copy to Clipboard Copied! このファイルを実行して、ストレージクラスター内のすべての OSD ノードからすべての OSD のキーリングを収集します。
例
./recovery.sh
[root@mons-1 ~]# ./recovery.sh
Copy to Clipboard Copied!
対応するノードから他のデーモンのキーリングを取得します。
Ceph Monitor の場合、キーリングはすべての Ceph モニターで同じです。
Syntax
cat /var/lib/ceph/mon/ceph-MONITOR_NODE/keyring
cat /var/lib/ceph/mon/ceph-MONITOR_NODE/keyring
Copy to Clipboard Copied! 例
cat /var/lib/ceph/mon/ceph-mons-1/keyring
[root@mons-1 ~]# cat /var/lib/ceph/mon/ceph-mons-1/keyring
Copy to Clipboard Copied! Ceph Manager の場合は、すべてのマネージャーノードからキーリングを取得します。
Syntax
cat /var/lib/ceph/mgr/ceph-MANAGER_NODE/keyring
cat /var/lib/ceph/mgr/ceph-MANAGER_NODE/keyring
Copy to Clipboard Copied! 例
cat /var/lib/ceph/mgr/ceph-mons-1/keyring
[root@mons-1 ~]# cat /var/lib/ceph/mgr/ceph-mons-1/keyring
Copy to Clipboard Copied! Ceph OSD の場合、キーリングは上記のスクリプトから生成され、一時的なパスに保存されます。
この例では、OSD キーリングは
/tmp/monstore/keyring
ファイルに保存されます。クライアントについては、すべてのクライアントノードからキーリングを取得します。
Syntax
cat /etc/ceph/CLIENT_KEYRING
cat /etc/ceph/CLIENT_KEYRING
Copy to Clipboard Copied! 例
cat /etc/ceph/ceph.client.admin.keyring
[root@client ~]# cat /etc/ceph/ceph.client.admin.keyring
Copy to Clipboard Copied! メタデータサーバー (MDS) の場合は、すべての Ceph MDS ノードからキーリングを取得します。
Syntax
cat /var/lib/ceph/mds/ceph-MDS_NODE/keyring
cat /var/lib/ceph/mds/ceph-MDS_NODE/keyring
Copy to Clipboard Copied! 例
cat /var/lib/ceph/mds/ceph-mds-1/keyring
[root@mons-2 ~]# cat /var/lib/ceph/mds/ceph-mds-1/keyring
Copy to Clipboard Copied! このキーリングの場合は、以下の cap を追加します (存在しない場合)。
caps mds = "allow" caps mon = "allow profile mds" caps osd = "allow *"
caps mds = "allow" caps mon = "allow profile mds" caps osd = "allow *"
Copy to Clipboard Copied! Ceph Object Gateway の場合は、すべての Ceph Object Gateway ノードからキーリングを取得します。
Syntax
cat /var/lib/ceph/radosgw/ceph-CEPH_OBJECT_GATEWAY_NODE/keyring
cat /var/lib/ceph/radosgw/ceph-CEPH_OBJECT_GATEWAY_NODE/keyring
Copy to Clipboard Copied! 例
cat /var/lib/ceph/radosgw/ceph-rgw-1/keyring
[root@mons-3 ~]# cat /var/lib/ceph/radosgw/ceph-rgw-1/keyring
Copy to Clipboard Copied! このキーリングの場合は、以下の cap を追加します (存在しない場合)。
caps mon = "allow rw" caps osd = "allow *"
caps mon = "allow rw" caps osd = "allow *"
Copy to Clipboard Copied!
Ansible 管理ノードで、前の手順で取得したすべてのキーリングでファイルを作成します。
例
cat /tmp/monstore/keyring [mon.] key = AQAa+RxhAAAAABAApmwud0GQHX0raMBc9zTAYQ== caps mon = "allow *" [client.admin] key = AQAo+RxhcYWtGBAAiY4kKltMGnAXqPLM2A+B8w== caps mds = "allow *" caps mgr = "allow *" caps mon = "allow *" caps osd = "allow *" [mgr.mons-1] key = AQA++RxhAAAAABAAKdG1ETTEMR8KPa9ZpfcIzw== caps mds = "allow *" caps mon = "allow profile mgr" caps osd = "allow *" [mgr.mons-2] key = AQA9+RxhAAAAABAAcCBxsoaIl0sdHTz3dqX4SQ== caps mds = "allow *" caps mon = "allow profile mgr" caps osd = "allow *" [mgr.mons-3] key = AQA/+RxhAAAAABAAwe/mwv0hS79fWP+00W6ypQ== caps mds = "allow *" caps mon = "allow profile mgr" caps osd = "allow *" [osd.1] key = AQB/+RxhlH8rFxAAL3mb8Kdb+QuWWdJi+RvwGw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.5] key = AQCE+RxhKSNsHRAAIyLO5g75tqFVsl6MEEzwXw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.8] key = AQCJ+Rxhc0wHJhAA5Bb2kU9Nadpm3UCLASnCfw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.2] key = AQB/+RxhhrQCGRAAUhh77gIVhN8zsTbaKMJuHw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.4] key = AQCE+Rxh0mDxDRAApAeqKOJycW5bpP3IuAhSMw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.7] key = AQCJ+Rxhn+RAIhAAp1ImK1jiazBsDpmTQvVEVw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.0] key = AQB/+RxhPhh+FRAAc5b0nwiuK6o1AIbjVc6tQg== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.3] key = AQCE+RxhJv8PARAAqCzH2br1xJmMTNnqH3I9mA== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.6] key = AQCI+RxhAt4eIhAAYQEJqSNRT7l2WNl/rYQcKQ== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.1] key = AQB/+RxhlH8rFxAAL3mb8Kdb+QuWWdJi+RvwGw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.5] key = AQCE+RxhKSNsHRAAIyLO5g75tqFVsl6MEEzwXw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.8] key = AQCJ+Rxhc0wHJhAA5Bb2kU9Nadpm3UCLASnCfw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.2] key = AQB/+RxhhrQCGRAAUhh77gIVhN8zsTbaKMJuHw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.0] key = AQB/+RxhPhh+FRAAc5b0nwiuK6o1AIbjVc6tQg== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.3] key = AQCE+RxhJv8PARAAqCzH2br1xJmMTNnqH3I9mA== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.6] key = AQCI+RxhAt4eIhAAYQEJqSNRT7l2WNl/rYQcKQ== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [mds.mds-1] key = AQDs+RxhAF9vERAAdn6ArdUJ31RLr2sBVkzp3A== caps mds = "allow" caps mon = "allow profile mds" caps osd = "allow *" [mds.mds-2] key = AQDs+RxhROoAFxAALAgMfM45wC5ht/vSFN2EzQ== caps mds = "allow" caps mon = "allow profile mds" caps osd = "allow *" [mds.mds-3] key = AQDs+Rxhd092FRAArXLIHAhMp2z9zcWDCSoIDQ== caps mds = "allow" caps mon = "allow profile mds" caps osd = "allow *" [client.rgw.rgws-1.rgw0] key = AQD9+Rxh0iP2MxAAYY76Js1AaZhzFG44cvcyOw== caps mon = "allow rw" caps osd = "allow *"
[root@admin ~]# cat /tmp/monstore/keyring [mon.] key = AQAa+RxhAAAAABAApmwud0GQHX0raMBc9zTAYQ== caps mon = "allow *" [client.admin] key = AQAo+RxhcYWtGBAAiY4kKltMGnAXqPLM2A+B8w== caps mds = "allow *" caps mgr = "allow *" caps mon = "allow *" caps osd = "allow *" [mgr.mons-1] key = AQA++RxhAAAAABAAKdG1ETTEMR8KPa9ZpfcIzw== caps mds = "allow *" caps mon = "allow profile mgr" caps osd = "allow *" [mgr.mons-2] key = AQA9+RxhAAAAABAAcCBxsoaIl0sdHTz3dqX4SQ== caps mds = "allow *" caps mon = "allow profile mgr" caps osd = "allow *" [mgr.mons-3] key = AQA/+RxhAAAAABAAwe/mwv0hS79fWP+00W6ypQ== caps mds = "allow *" caps mon = "allow profile mgr" caps osd = "allow *" [osd.1] key = AQB/+RxhlH8rFxAAL3mb8Kdb+QuWWdJi+RvwGw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.5] key = AQCE+RxhKSNsHRAAIyLO5g75tqFVsl6MEEzwXw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.8] key = AQCJ+Rxhc0wHJhAA5Bb2kU9Nadpm3UCLASnCfw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.2] key = AQB/+RxhhrQCGRAAUhh77gIVhN8zsTbaKMJuHw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.4] key = AQCE+Rxh0mDxDRAApAeqKOJycW5bpP3IuAhSMw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.7] key = AQCJ+Rxhn+RAIhAAp1ImK1jiazBsDpmTQvVEVw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.0] key = AQB/+RxhPhh+FRAAc5b0nwiuK6o1AIbjVc6tQg== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.3] key = AQCE+RxhJv8PARAAqCzH2br1xJmMTNnqH3I9mA== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.6] key = AQCI+RxhAt4eIhAAYQEJqSNRT7l2WNl/rYQcKQ== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.1] key = AQB/+RxhlH8rFxAAL3mb8Kdb+QuWWdJi+RvwGw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.5] key = AQCE+RxhKSNsHRAAIyLO5g75tqFVsl6MEEzwXw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.8] key = AQCJ+Rxhc0wHJhAA5Bb2kU9Nadpm3UCLASnCfw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.2] key = AQB/+RxhhrQCGRAAUhh77gIVhN8zsTbaKMJuHw== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.0] key = AQB/+RxhPhh+FRAAc5b0nwiuK6o1AIbjVc6tQg== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.3] key = AQCE+RxhJv8PARAAqCzH2br1xJmMTNnqH3I9mA== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [osd.6] key = AQCI+RxhAt4eIhAAYQEJqSNRT7l2WNl/rYQcKQ== caps mgr = "allow profile osd" caps mon = "allow profile osd" caps osd = "allow *" [mds.mds-1] key = AQDs+RxhAF9vERAAdn6ArdUJ31RLr2sBVkzp3A== caps mds = "allow" caps mon = "allow profile mds" caps osd = "allow *" [mds.mds-2] key = AQDs+RxhROoAFxAALAgMfM45wC5ht/vSFN2EzQ== caps mds = "allow" caps mon = "allow profile mds" caps osd = "allow *" [mds.mds-3] key = AQDs+Rxhd092FRAArXLIHAhMp2z9zcWDCSoIDQ== caps mds = "allow" caps mon = "allow profile mds" caps osd = "allow *" [client.rgw.rgws-1.rgw0] key = AQD9+Rxh0iP2MxAAYY76Js1AaZhzFG44cvcyOw== caps mon = "allow rw" caps osd = "allow *"
Copy to Clipboard Copied! オプション: 各 Ceph Monitor ノードで、モニターマップが利用できないことを確認します。
例
ceph-monstore-tool /tmp/monstore get monmap -- --out /tmp/monmap monmaptool /tmp/monmap --print
[root@mons-1 ~]# ceph-monstore-tool /tmp/monstore get monmap -- --out /tmp/monmap [root@mons-1 ~]# monmaptool /tmp/monmap --print monmaptool: monmap file /tmp/monmap monmaptool: couldn't open /tmp/monmap: (2) No such file or directory Notice theNo such file or directory error message if monmap is missed Notice that the “No such file or directory” error message if monmap is missed
Copy to Clipboard Copied! 各 Ceph Monitor ノードから、
etc/ceph/ceph.conf
ファイルから MONITOR_ID、IP_ADDRESS_OF_MONITOR、および FSID を取得します。例
[global] cluster network = 10.0.208.0/22 fsid = 9877bde8-ccb2-4758-89c3-90ca9550ffea mon host = [v2:10.0.211.00:3300,v1:10.0.211.00:6789],[v2:10.0.211.13:3300,v1:10.0.211.13:6789],[v2:10.0.210.13:3300,v1:10.0.210.13:6789] mon initial members = ceph-mons-1, ceph-mons-2, ceph-mons-3
[global] cluster network = 10.0.208.0/22 fsid = 9877bde8-ccb2-4758-89c3-90ca9550ffea mon host = [v2:10.0.211.00:3300,v1:10.0.211.00:6789],[v2:10.0.211.13:3300,v1:10.0.211.13:6789],[v2:10.0.210.13:3300,v1:10.0.210.13:6789] mon initial members = ceph-mons-1, ceph-mons-2, ceph-mons-3
Copy to Clipboard Copied! Ceph Monitor ノードで、モニターマップを再ビルドします。
Syntax
monmaptool --create --addv MONITOR_ID IP_ADDRESS_OF_MONITOR --enable-all-features --clobber PATH_OF_MONITOR_MAP --fsid FSID
monmaptool --create --addv MONITOR_ID IP_ADDRESS_OF_MONITOR --enable-all-features --clobber PATH_OF_MONITOR_MAP --fsid FSID
Copy to Clipboard Copied! 例
monmaptool --create --addv mons-1 [v2:10.74.177.30:3300,v1:10.74.177.30:6789] --addv mons-2 [v2:10.74.179.197:3300,v1:10.74.179.197:6789] --addv mons-3 [v2:10.74.182.123:3300,v1:10.74.182.123:6789] --enable-all-features --clobber /root/monmap.mons-1 --fsid 6c01cb34-33bf-44d0-9aec-3432276f6be8
[root@mons-1 ~]# monmaptool --create --addv mons-1 [v2:10.74.177.30:3300,v1:10.74.177.30:6789] --addv mons-2 [v2:10.74.179.197:3300,v1:10.74.179.197:6789] --addv mons-3 [v2:10.74.182.123:3300,v1:10.74.182.123:6789] --enable-all-features --clobber /root/monmap.mons-1 --fsid 6c01cb34-33bf-44d0-9aec-3432276f6be8 monmaptool: monmap file /root/monmap.mons-1 monmaptool: set fsid to 6c01cb34-33bf-44d0-9aec-3432276f6be8 monmaptool: writing epoch 0 to /root/monmap.mon-a (3 monitors)
Copy to Clipboard Copied! Ceph Monitor ノードで、生成されたモニターマップを確認します。
Syntax
monmaptool PATH_OF_MONITOR_MAP --print
monmaptool PATH_OF_MONITOR_MAP --print
Copy to Clipboard Copied! 例
monmaptool /root/monmap.mons-1 --print
[root@mons-1 ~]# monmaptool /root/monmap.mons-1 --print monmaptool: monmap file /root/monmap.mons-1 epoch 0 fsid 6c01cb34-33bf-44d0-9aec-3432276f6be8 last_changed 2021-11-23 02:57:23.235505 created 2021-11-23 02:57:23.235505 min_mon_release 0 (unknown) election_strategy: 1 0: [v2:10.74.177.30:3300/0,v1:10.74.177.30:6789/0] mon.mons-1 1: [v2:10.74.179.197:3300/0,v1:10.74.179.197:6789/0] mon.mons-2 2: [v2:10.74.182.123:3300/0,v1:10.74.182.123:6789/0] mon.mons-3
Copy to Clipboard Copied! モニターを復元する Ceph Monitor ノードで、収集したマップから Ceph Monitor ストアを再ビルドします。
Syntax
ceph-monstore-tool /tmp/monstore rebuild -- --keyring KEYRING_PATH --monmap PATH_OF_MONITOR_MAP
ceph-monstore-tool /tmp/monstore rebuild -- --keyring KEYRING_PATH --monmap PATH_OF_MONITOR_MAP
Copy to Clipboard Copied! この例では、リカバリーは
mons-1
ノードで実行されます。例
ceph-monstore-tool /tmp/monstore rebuild -- --keyring /tmp/monstore/keyring --monmap /root/monmap.mons-1
[root@mons-1 ~]# ceph-monstore-tool /tmp/monstore rebuild -- --keyring /tmp/monstore/keyring --monmap /root/monmap.mons-1
Copy to Clipboard Copied! monstore ディレクトリーの所有権を ceph に変更します。
例
chown -R ceph:ceph /tmp/monstore
[root@mons-1 ~]# chown -R ceph:ceph /tmp/monstore
Copy to Clipboard Copied! すべての Ceph Monitor ノードで、破損したストアのバックアップを作成します。
例
mv /var/lib/ceph/mon/ceph-mons-1/store.db /var/lib/ceph/mon/ceph-mons-1/store.db.corrupted
[root@mons-1 ~]# mv /var/lib/ceph/mon/ceph-mons-1/store.db /var/lib/ceph/mon/ceph-mons-1/store.db.corrupted
Copy to Clipboard Copied! すべての Ceph Monitor ノードで、破損したストアを置き換えます。
例
scp -r /tmp/monstore/store.db mons-1:/var/lib/ceph/mon/ceph-mons-1/
[root@mons-1 ~]# scp -r /tmp/monstore/store.db mons-1:/var/lib/ceph/mon/ceph-mons-1/
Copy to Clipboard Copied! すべての Ceph Monitor ノードで、新規ストアの所有者を変更します。
例
chown -R ceph:ceph /var/lib/ceph/mon/ceph-HOSTNAME/store.db
[root@mons-1 ~]# chown -R ceph:ceph /var/lib/ceph/mon/ceph-HOSTNAME/store.db
Copy to Clipboard Copied! すべての Ceph OSD ノードで、OSD を起動します。
例
sudo systemctl start ceph-osd.target
[root@osds-1 ~]# sudo systemctl start ceph-osd.target
Copy to Clipboard Copied! すべての Ceph Monitor ノードで、モニターを起動します。
例
sudo systemctl start ceph-mon.target
[root@mons-1 ~]# sudo systemctl start ceph-mon.target
Copy to Clipboard Copied!