[ceph] phase in new script for creating monitor

This commit is contained in:
Nico Schottelius 2021-02-07 12:37:53 +01:00
parent 095b184be9
commit 3c3c53de2e
1 changed files with 9 additions and 4 deletions

View File

@ -5,12 +5,17 @@ if [ $# -ne 1 ]; then
exit 1
fi
fname=$1
monkey=$(mktemp)
monmap=$(mktemp)
ceph-mon --mkfs -i $(hostname) --keyring "$fname" --setuser ceph --setgroup ceph
touch /var/lib/ceph/mon/ceph-$(hostname)/sysvinit
ceph auth get mon. -o $monkey
ceph mon getmap -o $monmap
# Fix broken permissions
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, if available