Skip to content

Instantly share code, notes, and snippets.

@kofemann
Last active October 5, 2020 00:04
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save kofemann/796c1f07f87adc1eb8e3 to your computer and use it in GitHub Desktop.
Save kofemann/796c1f07f87adc1eb8e3 to your computer and use it in GitHub Desktop.
Single node CEPH setup
#
# Enable CEPH repos as described at http://ceph.com/docs/master/install/get-packages/#rpm
# Install ceph-deploy package
#
export DATA_DEV=sdb
export JRNL_DEV=sdc
export FS_TYPE=xfs
export CEPH_S_NODE=ceph-s
export CEPH_RELEASE=giant
#
# Attention!
# the disks DATA_DEV and DATA_DEV will be re-partitioned!
#
# if you need to install CEPH packages
ceph-deploy install --stable ${CEPH_RELEASE} ${CEPH_S_NODE}
ceph-deploy pkg --install librados-dev ${CEPH_S_NODE}
ceph-deploy new ${CEPH_S_NODE}
echo "osd crush chooseleaf type = 0" >> ceph.conf
echo "osd pool default size = 1" >> ceph.conf
ceph-deploy mon create-initial ${CEPH_S_NODE}
ceph-deploy disk --fs-type ${FS_TYPE} zap ${CEPH_S_NODE}:${DATA_DEV}
ceph-deploy disk --fs-type ${FS_TYPE} zap ${CEPH_S_NODE}:${JRNL_DEV}
ceph-deploy osd --fs-type ${FS_TYPE} create ${CEPH_S_NODE}:${DATA_DEV}:${JRNL_DEV}
#
# The following files can be copied to the client host to be used with librados:
#
# /etc/ceph/ceph.client.admin.keyring
# /etc/ceph/ceph.conf
@rendeluitjes
Copy link

The ${zap reference in line 26 seems to be a typo? No closing bracket.

@kofemann
Copy link
Author

thanks, fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment