2018-02-15 22:08:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-02-07 13:20:34 +00:00
|
|
|
set -x
|
|
|
|
|
2021-02-07 11:37:53 +00:00
|
|
|
monkey=$(mktemp)
|
|
|
|
monmap=$(mktemp)
|
2018-02-15 22:08:24 +00:00
|
|
|
|
2021-02-07 11:37:53 +00:00
|
|
|
ceph auth get mon. -o $monkey
|
|
|
|
ceph mon getmap -o $monmap
|
2018-02-15 22:11:29 +00:00
|
|
|
|
2021-02-07 11:37:53 +00:00
|
|
|
mkdir /var/lib/ceph/mon/ceph-$(hostname)
|
|
|
|
ceph-mon -i $(hostname) --mkfs --monmap $monmap --keyring $monkey
|
|
|
|
chown -R ceph:ceph /var/lib/ceph/mon/ceph-$(hostname)
|
|
|
|
|
|
|
|
# Fix broken permissions on Debian
|
2018-03-08 12:43:26 +00:00
|
|
|
chown ceph:ceph /var/run/ceph/
|
|
|
|
|
2021-02-07 12:01:48 +00:00
|
|
|
# Starting with monit
|
|
|
|
/opt/ungleich-tools/monit-ceph-create-start mon.$(hostname)
|
2021-02-07 13:20:34 +00:00
|
|
|
|
|
|
|
rm -f ${monkey} ${monmap}
|