Managing Ceph pools
Ceph stores data on pools assigned to a specific ruleset. A ruleset in a CRUSH map dictates which pools belong to which OSDs. By simply changing an assigned ruleset, we can use a complete set of OSDs to store existing data. In this example, we are going to create a new pool and assign the pool to the new ruleset ssd
, which we created earlier. Then we will add some SSDs to the cluster.
Creating a new Ceph pool using the CLI
The following is the command format to create the Ceph pool:
# ceph osd pool create <poolname> <pg> <pgs(equal to pg)>
Before we create the pool, we need to calculate the number of PGs for the pool. We will use the same formula seen in the Placement Group (PG) section earlier in this chapter:
We have two nodes and will use two SSDs in each node. According to the formula, we need the following number of PGs:
Our new pool should have 200 PGs. So the following is our command to create a pool:
# ceph osd pool create ssd 256 256