illustrate
After deploying the ceph cluster ( active + clean state ),
Let's practice ceph block device (ie RBD or RADOS block device).
We need to initialize and use the volume (image) created by the ceph cluster on a new client node
On the ceph-client node, install ceph
1. Install ceph for ceph-client on the admin node
ceph-deploy install ceph-client
2. Distribute ceph.conf and ceph.client.admin.keyring to the ceph-client node
ceph-deploy admin
3. Confirm that the keyring file has read permission
chmod +r /etc/ceph/ceph.client.admin.keyring
On the admin node, create a block device pool
1. On the admin node, create a pool named rbd
1. ceph osd pool create rbd 8
2. On the admin node, initialize the pool
rbd pool init rbd
On the ceph-client node, configure, use block devices
1. On the ceph-client node, create a block device image
rbd create foo --size 4096 --image-feature layering [-m {mon-IP}] [-k /path/to/ceph.client.admin.keyring]
2. On the ceph-client node, map the image to the block device
rbd map foo --name client.admin [-m {mon-IP}] [-k /path/to/ceph.client.admin.keyring]
3. On the ceph-client node, create a file system for the block device
mkfs.ext4 -m0 /dev/rbd/rbd/foo
4. On the ceph-client node, mount the block device
mkdir /mnt/ceph-block-device
mount /dev/rbd/rbd/foo /mnt/ceph-block-device
cd /mnt/ceph-block-device
5.
Configure block devices to be automatically mapped and mounted on boot (and unmounted/unmapped on shutdown) - see: http://docs.ceph.com/docs/master/man/8/rbdmap/