Libro sobre Proxmox maestria
High Availability Storage for High Availability Cluster
For instance, in the example of 150 OSDs, three Ceph nodes, and two replicas, our PG was 7500 per pool. This gave us 50 PGs per OSD. If we had three pools in that setup and each pool had 7500 PGs, then the total number of PGs would have been 150 per OSD. To balance the PGs across the cluster, divide 7500 by 3 for three pools and set a PG of 2500 for each pool. This gives us 2500/150 OSDs = 16 PGs per pool per OSD or 16 x 3 pools = 48 total PGs per OSD. Since we have two replicas in this setup, the final total PGs per OSD will be 48 x 2 replicas = 96 PGs. This is within the recommended 50-100 range of PGs per OSD.
Here is another example scenario. Try to see if you can come up with the final PG value on your own. The answer is given after the scenario. The calculation for this scenario is given at the end of this chapter.
Question: The Ceph cluster has five nodes, 120 OSDs, three replicas, and four pools. What is the PG value per pool? What is the total number of PGs per OSD for each replica? What is the total PGs per OSD for all pools and replicas?
Answer: Total PG for each pool is 1000. Each replica of pools will have 32 PGs per OSD. The total PGs per OSD for all pools and replicas is 96.
If we want to understand the relationship between all the Ceph components we have seen so far, think of it this way: each Pool comprises multiple PGs. Each PG comprises multiple OSDs. The OSD map keeps track of the number of OSDs in the cluster and in the nodes they are in. The MON map keeps track of the number of Monitors in a cluster to form a Quorum and maintains a master copy of the cluster map. A CRUSH map dictates how much data needs to be written to an OSD and how to write or read it. These are the building blocks of a Ceph cluster.
The following diagram is a basic representation of Proxmox and the Ceph cluster. Note that both clusters are on a separate subnet on separate switches.