Deploying a Ceph Cluster
- Create a local source.
1 2 3 4 5 6
yum -y install createrepo cd /home/ceph-glz cp /home/rpmbuild/RPMS/aarch64/*rpm ./ createrepo ./ cd /etc/yum.repos.d/ vi ceph-local.repo
1 2 3 4 5 6 7 8 9 10 11 12 13
[local] name=local baseurl=file:///home/ceph-glz enable=1 gpgcheck=0 [Ceph-noarch] name = Ceph noarch packages baseurl = http://download.ceph.com/rpm-nautilus/el7/noarch enabled = 1 gpgcheck = 1 type = rpm-md gpgkey = https://download.ceph.com/keys/release.asc priority = 1
- Manually install the RPM package of the compression algorithm.
1rpm -ivh /home/ceph-glz/glz-1.0.0-centos.aarch64.rpm
- Deploy the MON and MGR nodes.
For details, see Installing the Ceph Software, Deploying MON Nodes, and Deploying MGR Nodes in the Ceph Block Storage Deployment Guide (CentOS 7.6 & openEuler 20.03).
In the deployment guide, the Ceph image source is the official Ceph image, which is a Ceph RPM package that does not contain the compression algorithm plugin. Therefore, you need to configure Ceph using the local source.
- Modify the Ceph configuration file ceph.conf.
- The configuration items provided in this document are applicable only for the HDD scenario.
- bluestore_min_alloc_size_hdd indicates the minimum allocated size of the bluestore object. The default value is 32 KB. You can change the value to 8 KB to reduce the size of the compressed data and ensure the compression ratio.
- The product of osd_op_num_shards_hdd and osd_op_num_threads_per_shard_hdd is the number of threads for the OSD process to process I/O requests. The default value is 5 x 1. You can change the value to 12 x 2 to deliver the maximum performance of the compression algorithm.
1vi /etc/ceph/ceph.conf- Change the default value of bluestore_min_alloc_size_hdd to 8 KB.
1bluestore_min_alloc_size_hdd = 8192
The modification must be performed before OSD deployment. Otherwise, the modification does not take effect.
- Change the default number of OSD threads.
1 2
osd_op_num_shards_hdd = 12 osd_op_num_threads_per_shard_hdd = 2

The modification can be dynamically adjusted after the OSD node is deployed.
- Deploy OSD nodes.