ungleich-tools/ceph/ceph-mon-create-start
2021-02-07 14:20:34 +01:00

21 lines
450 B
Bash
Executable file

#!/bin/sh
set -x
monkey=$(mktemp)
monmap=$(mktemp)
ceph auth get mon. -o $monkey
ceph mon getmap -o $monmap
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
chown ceph:ceph /var/run/ceph/
# Starting with monit
/opt/ungleich-tools/monit-ceph-create-start mon.$(hostname)
rm -f ${monkey} ${monmap}