Ceph Client:
Most ceph users do not store objects directly into the Ceph storage cluster, and they typically choose one or more of the Ceph block devices, the Ceph file system, and the Ceph object storage;
Block device:
To practice this manual, you must first complete the storage cluster and ensure that the ceph storage cluster is in active + Clean State in order to use the ceph block device .
1. Install Ceph on ceph-client, on the management node, install Ceph to the Ceph-client node via Ceph-deploy:
Ceph-deploy Install Ceph-client
2, on the management node, use ceph-deploy to copy the Ceph configuration files and ceph.client.admin.keyring to ceph-client .
Ceph-deploy Admin Ceph-client
The ceph-deploy tool copies the keyring to the /etc/ceph directory, ensuring that the keyring file is readable (such as sudo chmod + r /etc/ceph/ Ceph.client.admin.keyring ).
To configure a block device:
1, create a block device image on the ceph-client node.
RBD create foo--size 4096 [-M {mon-ip}] [-k/path/to/ceph.client.admin.keyring]
2. On the ceph-client node, map the image to a block device:
RBD map foo--pool RBD--name client.admin [-M {mon-ip}] [-k/path/to/ceph.client.admin.keyring]
3, on the Ceph-client node, after creating the file system can be used.
MKFS.EXT4-M0 /dev/rbd/rbd/foo
This command may take a long time
4. Mount the file system on the Ceph-client node.
Mkfir /mnt/ceph-block-device
Mount /dev/rbd/foo /mnt/ceph-block-device
Ceph Storage's Ceph client