RHEL7 上 Ceph MON 的手动引导
一个 Ceph MON 可以在 RHEL7 上手动创建和运行,用于测试目的,使用
$ sudo yum install ceph $ cat > /etc/ceph/ceph.conf <<EOF [global] fsid = $(uuidgen) mon_host = 127.0.0.1 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 127.0.0.1:6789/0 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...
集群不健康,因为它没有 OSD,但它是可用的
$ 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=127.0.0.1:6789/0}, 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