Manual bootstrap of a Ceph MON on RHEL7


A Ceph MON can be created and run manually for test purposes on RHEL7 with:

$ sudo yum install ceph $ cat > /etc/ceph/ceph.conf <<EOF [global] fsid = $(uuidgen) mon_host = auth_cluster_required = none auth_service_required = none auth_client_required = none filestore_xattr_use_omap = true EOF $ sudo ceph-mon --cluster ceph --mkfs -i a --keyring /dev/null ceph-mon: mon.noname-a is local, renaming to mon.a ceph-mon: set fsid to 80562a76-f13e-4b1e-8fd1-de8f774f2683 ceph-mon: created monfs at /var/lib/ceph/mon/ceph-a for mon.a $ sudo touch /var/lib/ceph/mon/ceph-a/sysvinit $ sudo service ceph start mon.a === mon.a === Starting Ceph mon.a on mira042... Running as unit run-7661.service. Starting ceph-create-keys on mira042...

the cluster is not healthy because it has no OSD but it is available:

$ ceph -s cluster 80562a76-f13e-4b1e-8fd1-de8f774f2683 health HEALTH_ERR 192 pgs stuck inactive; 192 pgs stuck unclean; no osds monmap e1: 1 mons at {a=}, election epoch 2, quorum 0 a osdmap e1: 0 osds: 0 up, 0 in pgmap v2: 192 pgs, 3 pools, 0 bytes data, 0 objects 0 kB used, 0 kB / 0 kB avail 192 creating