Skip to content

Instantly share code, notes, and snippets.

@tegila
Last active May 20, 2022 13:32
Show Gist options
  • Save tegila/3f54b908f5503ba893e14dfb9ad0864e to your computer and use it in GitHub Desktop.
Save tegila/3f54b908f5503ba893e14dfb9ad0864e to your computer and use it in GitHub Desktop.
[global]
fsid =
cluster = ceph
public network = 10.8.0.0/16
# Enable cephx authentication (which uses shared keys for almost everything)
auth cluster required = none
auth service required = none
auth client required = none
# Replication
osd pool default size = 2
osd pool default min size = 1
[mon]
# Global settings for monitors
mon host = host1, host2, host4
mon addr = 10.8.1.1:6789, 10.8.2.1:6789, 10.8.4.1:6789
mon initial members = 0, 1, 2
[mon.0]
host = host1
mon addr = 10.8.1.1:6789
[mon.1]
host = host2
mon addr = 10.8.2.1:6789
[mon.2]
host = host4
mon addr = 10.8.4.1:6789
uuidgen=$(uuidgen)
echo $uuidgen
cp ceph.conf /etc/ceph/

ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow'
awk '$1~"key" { print $3 }' /etc/ceph/ceph.client.admin.keyring > /etc/ceph/ceph.client.admin.secret
chmod 600 /etc/ceph/ceph.client.admin.secret

ceph-authtool --create-keyring /etc/ceph/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *' --import-keyring /etc/ceph/ceph.client.admin.keyring

monmaptool --create --fsid $(uuidgen) --add 0 10.8.1.1 --add 1 10.8.2.1 --add 2 10.8.4.1 /etc/ceph/ceph.initial-monmap

mkdir -p /var/log/ceph && chown ceph. /var/log/ceph
mkdir -p /var/lib/ceph/mon && chown ceph. /var/lib/ceph/mon
ceph-mon --mkfs -i 0 --monmap /etc/ceph/ceph.initial-monmap --keyring /etc/ceph/ceph.mon.keyring

systemctl enable|start ?ceph-mon.0?


ceph-volume lvm create --bluestore --data /dev/$DEVICE
ceph osd tree

@tegila
Copy link
Author

tegila commented May 20, 2022

@tegila
Copy link
Author

tegila commented May 20, 2022

@tegila
Copy link
Author

tegila commented May 20, 2022

@tegila
Copy link
Author

tegila commented May 20, 2022

@tegila
Copy link
Author

tegila commented May 20, 2022

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