I pulled info from a few different places and a lot of other reading, but things just weren't working on F21; trying
systemctl start cephjust wasn't producing any output, and all the
cephcli commands just hung. I had better success with F20.
The main difficulty was figuring out a working ceph.conf. My VM's IP address is 1902.168.124.101, and its hostname is 'localceph', so here's what I ended up with:
Ceph setup steps:
- Cloned an existing F20 VM I had kicking around, using virt-manager's clone wizard. I called it f20-ceph.
- In the VM, disable firewalld and set selinux to permissive. Not strictly required but I wanted to make this as simple as possible.
- Setup the ceph server:
yum install ceph
- I needed to set a hostname for my VM, ceph won't accept 'localhost':
hostnamectl set-hostname localceph
mkdir -p /data/mon.0 /data/osd.0
- Overwrite /etc/ceph/ceph.conf with the content listed above.
mkcephfs -a -c /etc/ceph/ceph.conf
service ceph start
- Prove it works from my host with:
sudo mount -t ceph $VM_IPADDRESS:/ /mnt
- Add some storage for testing:
- Libvirt only connects to Ceph's block device interface, RBD. The above mount example is _not_ what libvirt will see, it just proves we can talk to the server.
- Import files within the VM like:
rbd import $filename
- List files with:
Here's the pool definition I passed to
virsh pool-defineon my host: