diff options
Diffstat (limited to 'tools/ceph-mon-init.sh')
| -rwxr-xr-x | tools/ceph-mon-init.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/ceph-mon-init.sh b/tools/ceph-mon-init.sh new file mode 100755 index 0000000..af24ac5 --- /dev/null +++ b/tools/ceph-mon-init.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Initialize Ceph Monitor +# + +set -euo pipefail + +MON_ID="$1" +MON_DIR="/var/lib/ceph/mon/ceph-${MON_ID}" + +# Create monitor directory +mkdir -p "$MON_DIR" + +# Check if already initialized +if [ -f "$MON_DIR/done" ]; then + echo "Ceph monitor $MON_ID already initialized" + exit 0 +fi + +echo "TODO: Initialize Ceph monitor $MON_ID" +echo "This requires:" +echo " - Cluster FSID" +echo " - Monitor map" +echo " - Monitor keyring" +echo " - Admin keyring" + +# For now, just create the directory +chown -R ceph:ceph "$MON_DIR" 2>/dev/null || true + +# Mark as initialized (TODO: remove when actual init is implemented) +# touch "$MON_DIR/done" |
