...
Supponiamo che il nodo da reinstallare sia ceph-mon-03
Spengo i servizi mon e mgr:
Code Block |
---|
[root@ceph-mon-03 ~]# systemctl stop ceph-mgr.target
[root@ceph-mon-03 ~]# systemctl stop ceph-mon.target
[root@ceph-mon-03 ~]# systemctl stop ceph-mon@ceph-mon-03
|
Elimino il mon:
Code Block |
---|
[root@ceph-mon-03 ~]# ceph mon remove ceph-mon-03 |
In foreman metto il server nell'HostGroup hosts_all e reinstallo la macchina con AlmaLinux9
Configurazione rete dati:
Code Block |
---|
nmcli con mod eno3 ipv4.method manual ipv4.addr "192.168.61.208/24"
nmcli con mod eno3 802-3-ethernet.mtu 9000
nmcli con up eno3
nmcli con mod eno3 connection.autoconnect yes
|
Cancello l'utente ceph-mon-03:
Code Block |
---|
[root@ceph-mon-01 ~]# ceph auth del mgr.ceph-mon-03
[root@ceph-mon-01 ~]# |
Installo ceph:
Code Block |
---|
rpm -e epel-release # e' gia' installato ma disabilitato
yum install epel-release
rpm -Uvh https://download.ceph.com/rpm-quincy/el9/noarch/ceph-release-1-1.el9.noarch.rpm
yum clean all
yum update
yum install ceph |
In foreman metto il server nell'HosGroup ceph_prod
Code Block |
---|
puppet agent -t |
Copio da un altro nodo /etc/ceph/ceph.client.admin.keyring
Configurazione MON
Code Block |
---|
mkdir /var/lib/ceph/mon/ceph-ceph-mon-03
chown ceph.ceph /var/lib/ceph/mon/ceph-ceph-mon-03
mkdir /tmp/ceph-ceph-mon-03
ceph auth get mon. -o /tmp/ceph-ceph-mon-03/monkeyring
ceph mon getmap -o /tmp/ceph-ceph-mon-03/monmap
ceph-mon -i ceph-mon-03 --mkfs --monmap /tmp/ceph-ceph-mon-03/monmap --keyring /tmp/ceph-ceph-mon-03/monkeyring
touch /var/lib/ceph/mon/ceph-ceph-mon-03/systemd
chown ceph.ceph /var/lib/ceph/mon/ceph-ceph-mon-03/*
chown ceph.ceph /var/lib/ceph/mon/ceph-ceph-mon-03/store.db/*
systemctl start ceph-mon@ceph-mon-03
systemctl enable ceph-mon@ceph-mon-03 |
Configurazione MGR
Code Block |
---|
ceph auth get-or-create mgr.ceph-mon-03 mon 'allow profile mgr' osd 'allow *' mds 'allow *'
mkdir /var/lib/ceph/mgr/ceph-ceph-mon-03
chown ceph.ceph /var/lib/ceph/mgr/ceph-ceph-mon-03 |
Creo il file /var/lib/ceph/mgr/ceph-ceph-mon-03/keyring
Code Block |
---|
[root@ceph-mon-03 ~]# cat /var/lib/ceph/mgr/ceph-ceph-mon-03/keyring
[mgr.ceph-mon-03]
key = AQBpNp5mP+LFABAA59MxEhvILQ4Q8CyqOFsVdA== |
La chiave deve coincidere con:
Code Block |
---|
[root@ceph-mon-03 ~]# ceph auth get mgr.ceph-mon-03
[mgr.ceph-mon-03]
key = AQBpNp5mP+LFABAA59MxEhvILQ4Q8CyqOFsVdA==
caps mds = "allow *"
caps mon = "allow profile mgr"
caps osd = "allow *"
|
Code Block |
---|
[root@ceph-mon-03 ~]# chown ceph.ceph /var/lib/ceph/mgr/ceph-ceph-mon-03/keyring
[root@ceph-mon-03 ~]# chmod og-r /var/lib/ceph/mgr/ceph-ceph-mon-03/keyring
[root@ceph-mon-03 ~]# systemctl restart ceph-mgr@ceph-mon-03.service
[root@ceph-mon-03 ~]# systemctl enable ceph-mgr@ceph-mon-03.service
Created symlink /etc/systemd/system/ceph-mgr.target.wants/ceph-mgr@ceph-mon-03.service → /usr/lib/systemd/system/ceph-mgr@.service.
[root@ceph-mon-03 ~]# |
Nagios
Copio da un altro nodo:
/usr/lib64/nagios/plugins/check_ceph_mon
/usr/lib64/nagios/plugins/check_ceph_health
/home/nagios/client.nagios.keyring