ungleich-tools/ceph/ceph-mon-create-start
2020-12-12 13:27:49 +01:00

21 lines
457 B
Bash
Executable file

#!/bin/sh
if [ $# -ne 1 ]; then
echo "$0 initial-key-file"
exit 1
fi
fname=$1
ceph-mon --mkfs -i $(hostname) --keyring "$fname" --setuser ceph --setgroup ceph
touch /var/lib/ceph/mon/ceph-$(hostname)/sysvinit
# Fix broken permissions
chown ceph:ceph /var/run/ceph/
# Starting with monit, if available
if [ -e /etc/monit ]; then
/opt/ungleich-tools/monit-ceph-create-start mon.$(hostname)
else
/etc/init.d/ceph start mon.$(hostname)
fi