1 pg undersized health warn in rook ceph on single node clusterminikube
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
In the realm of software-defined storage, Ceph is a highly flexible, distributed storage system that's often used within Kubernetes environments to provide resilient, scalable storage. A common deployment scenario for testing and development purposes involves setting up Ceph on Minikube, a lightweight Kubernetes implementation ideal for single-node clusters. While this setup is useful for learning and experimentation, it sometimes throws warnings that can be puzzling to new users. One such warning is the `1 PG undersized` alert, which deserves a detailed explanation.
Understanding Placement Groups (PGs) in Ceph
Ceph uses Placement Groups (PGs) as an abstraction layer between data objects and Object Storage Daemons (OSDs). PGs distribute and manage data across the cluster to ensure data redundancy and fault tolerance. The health warning `1 PG undersized` usually indicates that one or more PGs do not have the expected number of object replicas.
Understanding the `undersized` state:
- PG Undersized: A PG is in an undersized state when it does not have the required number of replicas or erasure-coded chunks. This can lead to data not meeting its predefined replication or redundancy policy, thus decreasing resilience.
Common Causes of PG Undersized in Minikube
- Single Node Limitations:
- Minikube is not meant for production but for development and testing. It typically runs on a single virtual machine. As a result, it often doesn't have the necessary number of OSDs to fulfill the standard replication or erasure coding needs of a Ceph installation.
- Improper Cluster Configuration:
- If Ceph is configured with a replica size greater than 1, but there aren't enough OSDs to accommodate the replicas, PGs will be undersized.
- Resource Constraints:
- Since Minikube often runs with constrained resources, there could be insufficient CPU or memory to host more OSDs, which might lead to inadequate data distribution capabilities.
Inspecting and Troubleshooting the Warning
To conduct a proper diagnosis and potentially resolve the `1 PG undersized` warning, consider these steps:
Step 1: Verify OSD Count
Ensure that the number of OSDs aligns with the replication policy. Here's how you could inspect OSDs in Ceph:
Related reading
- 2 Helm Charts with shared Redis dependency
- 413 error with Kubernetes and Nginx ingress controller
- 502 Bad Gateway with Kubernetes Ingress
- A mountable secret and token are not automatically generated in serviceaccount
- access minikube service running on remote host
- access postgres in kubernetes from an application outside the cluster
- Accessing kube-dns outside of kubernetes cluster
- Accessing kubernetes dashboard gives Error trying to reach service 'dial tcp 10.44.0.28443 connect connection refused

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.