Skip to content

Instantly share code, notes, and snippets.

@hysios
Created July 10, 2018 06:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hysios/258988b78b3a478007f601e86ee17dd1 to your computer and use it in GitHub Desktop.
Save hysios/258988b78b3a478007f601e86ee17dd1 to your computer and use it in GitHub Desktop.
CLUSTER=ceph
ID=${1:-0}
NAME=${CLUSTER}-${ID}
MON_HOST=192.168.0.3
MON_PORT=6789
mkdir -p /var/lib/ceph/mds/${CLUSTER}-{ID}
ceph-authtool --create-keyring /var/lib/ceph/mds/$NAME/keyring --gen-key -n mds.${ID}
ceph auth add mds.${ID} osd "allow rwx" mds "allow" mon "allow profile mds" -i /var/lib/ceph/mds/$NAME/keyring
cat <<EOF >> /etc/ceph/ceph.conf
[mds.${ID}]
host = $ID
EOF
ceph-mds --cluster ${CLUSTER} -i ${ID} -m ${MON_HOST}:${MON_PORT} -f
systemctl start ceph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment