diff --git a/ceph-create-mon b/ceph-create-mon new file mode 100755 index 0000000..552374b --- /dev/null +++ b/ceph-create-mon @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ $# -ne 1 ]; then + echo "$0 initial-key-file" + exit 1 +fi + +fname=$1 + +ceph-mon --mkfs -i $(hostname) --keyring "$fname" +ceph-mon --mkfs -i $(hostname) --keyring "$fname" --setuser ceph --setgroup ceph +touch /var/lib/ceph/mon/ceph-$(hostname)/sysvinit diff --git a/ceph-monitor-bootstrap b/ceph-monitor-bootstrap old mode 100644 new mode 100755 index 446a14a..fee7519 --- a/ceph-monitor-bootstrap +++ b/ceph-monitor-bootstrap @@ -1,5 +1,7 @@ #!/bin/sh +# Creates the initial keys + fname=/tmp/monkey ceph-authtool --create-keyring "$fname" --gen-key -n mon. @@ -8,4 +10,5 @@ ceph-authtool "$fname" --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' cat "$fname" # ensure mon has persistent storage! -ceph-mon --mkfs -i mon.$(hostname) --keyring /tmp/monkey +ceph-mon --mkfs -i $(hostname) --keyring /tmp/monkey +touch /var/lib/ceph/mon/ceph-server3/