New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSD Resize Increases Used Capacity Not Available Capacity #14099
Comments
@jameshearttech can you share the |
For context there is this Slack thread. I see
|
The ceph side values are correct So it is the dashboard that probably has an error, |
I'm not following how you concluded that the Ceph side values are correct from: The queries in the dashboard are pretty straight forward. The dashboard uses these queries to visualize available, used, and total capacity. How do we conclude that the dashboard is showing incorrect used/available capacity, but the Ceph CLI is showing correct used/available capacity? Is it an issue with the Prometheus metrics from Ceph? EDIT: I fixed query C: |
From your Screenshots:
Which says |
I don't understand. My whole point was that used space increased rather than available space. You seem to be interpreting that differently? |
But if you see the ceph output the values are correct.
|
At this point I have replaced all the OSDs with slightly larger OSDs. I'm trying to get back down to 4 K8s nodes. I wanted to take another shot at resizing an OSD. Here is the current screenshot from Grafana. Here is the current output of $ kubectl exec $(kubectl get pod -n rook-ceph | awk '/tool/ {print $1}') -n rook-ceph -- sh -c "ceph osd df tree"
ID CLASS WEIGHT REWEIGHT SIZE RAW USE DATA OMAP META AVAIL %USE VAR PGS STATUS TYPE NAME
-1 3.51599 - 3.5 TiB 1.1 TiB 1.1 TiB 418 MiB 13 GiB 2.4 TiB 31.01 1.00 - root default
-5 0.43950 - 450 GiB 125 GiB 124 GiB 0 B 1.5 GiB 325 GiB 27.81 0.90 - host mgmt-worker0
0 ssd 0.43950 1.00000 450 GiB 125 GiB 124 GiB 0 B 1.5 GiB 325 GiB 27.81 0.90 89 up osd.0
-9 0.43950 - 450 GiB 145 GiB 144 GiB 29 MiB 1.2 GiB 305 GiB 32.19 1.04 - host mgmt-worker1
2 ssd 0.43950 1.00000 450 GiB 145 GiB 144 GiB 29 MiB 1.2 GiB 305 GiB 32.19 1.04 108 up osd.2
-3 0.43950 - 450 GiB 130 GiB 129 GiB 60 MiB 1.5 GiB 320 GiB 28.97 0.93 - host mgmt-worker2
1 ssd 0.43950 1.00000 450 GiB 130 GiB 129 GiB 60 MiB 1.5 GiB 320 GiB 28.97 0.93 92 up osd.1
-7 0.43950 - 450 GiB 140 GiB 138 GiB 75 MiB 1.1 GiB 310 GiB 31.02 1.00 - host mgmt-worker3
3 ssd 0.43950 1.00000 450 GiB 140 GiB 138 GiB 75 MiB 1.1 GiB 310 GiB 31.02 1.00 102 up osd.3
-11 0.43950 - 450 GiB 146 GiB 144 GiB 66 MiB 2.0 GiB 304 GiB 32.44 1.05 - host mgmt-worker4
4 ssd 0.43950 1.00000 450 GiB 146 GiB 144 GiB 66 MiB 2.0 GiB 304 GiB 32.44 1.05 107 up osd.4
-13 0.43950 - 450 GiB 151 GiB 149 GiB 56 MiB 1.6 GiB 299 GiB 33.58 1.08 - host mgmt-worker5
5 ssd 0.43950 1.00000 450 GiB 151 GiB 149 GiB 56 MiB 1.6 GiB 299 GiB 33.58 1.08 99 up osd.5
-15 0.43950 - 450 GiB 134 GiB 132 GiB 64 MiB 1.9 GiB 316 GiB 29.69 0.96 - host mgmt-worker6
6 ssd 0.43950 1.00000 450 GiB 134 GiB 132 GiB 64 MiB 1.9 GiB 316 GiB 29.69 0.96 96 up osd.6
-17 0.43950 - 450 GiB 146 GiB 144 GiB 67 MiB 2.1 GiB 304 GiB 32.43 1.05 - host mgmt-worker7
7 ssd 0.43950 1.00000 450 GiB 146 GiB 144 GiB 67 MiB 2.1 GiB 304 GiB 32.43 1.05 102 up osd.7
TOTAL 3.5 TiB 1.1 TiB 1.1 TiB 418 MiB 13 GiB 2.4 TiB 31.01
MIN/MAX VAR: 0.90/1.08 STDDEV: 1.88 I drained then shutdown Here is the post osd.0 resize screenshot from Grafana. Here is the post osd.0 resize output of $ kubectl exec $(kubectl get pod -n rook-ceph | awk '/tool/ {print $1}') -n rook-ceph -- sh -c "ceph osd df tree"
ID CLASS WEIGHT REWEIGHT SIZE RAW USE DATA OMAP META AVAIL %USE VAR PGS STATUS TYPE NAME
-1 3.51599 - 3.9 TiB 1.5 TiB 1.1 TiB 440 MiB 12 GiB 2.4 TiB 37.90 1.00 - root default
-5 0.43950 - 850 GiB 546 GiB 146 GiB 22 MiB 723 MiB 304 GiB 64.27 1.70 - host mgmt-worker0
0 ssd 0.43950 1.00000 850 GiB 546 GiB 146 GiB 22 MiB 723 MiB 304 GiB 64.27 1.70 99 up osd.0
-9 0.43950 - 450 GiB 141 GiB 139 GiB 29 MiB 1.2 GiB 309 GiB 31.24 0.82 - host mgmt-worker1
2 ssd 0.43950 1.00000 450 GiB 141 GiB 139 GiB 29 MiB 1.2 GiB 309 GiB 31.24 0.82 106 up osd.2
-3 0.43950 - 450 GiB 130 GiB 129 GiB 60 MiB 1.5 GiB 320 GiB 28.97 0.76 - host mgmt-worker2
1 ssd 0.43950 1.00000 450 GiB 130 GiB 129 GiB 60 MiB 1.5 GiB 320 GiB 28.97 0.76 92 up osd.1
-7 0.43950 - 450 GiB 140 GiB 138 GiB 75 MiB 1.1 GiB 310 GiB 31.03 0.82 - host mgmt-worker3
3 ssd 0.43950 1.00000 450 GiB 140 GiB 138 GiB 75 MiB 1.1 GiB 310 GiB 31.03 0.82 102 up osd.3
-11 0.43950 - 450 GiB 146 GiB 144 GiB 66 MiB 2.0 GiB 304 GiB 32.44 0.86 - host mgmt-worker4
4 ssd 0.43950 1.00000 450 GiB 146 GiB 144 GiB 66 MiB 2.0 GiB 304 GiB 32.44 0.86 107 up osd.4
-13 0.43950 - 450 GiB 140 GiB 138 GiB 56 MiB 1.6 GiB 310 GiB 31.13 0.82 - host mgmt-worker5
5 ssd 0.43950 1.00000 450 GiB 140 GiB 138 GiB 56 MiB 1.6 GiB 310 GiB 31.13 0.82 94 up osd.5
-15 0.43950 - 450 GiB 134 GiB 132 GiB 64 MiB 1.9 GiB 316 GiB 29.69 0.78 - host mgmt-worker6
6 ssd 0.43950 1.00000 450 GiB 134 GiB 132 GiB 64 MiB 1.9 GiB 316 GiB 29.69 0.78 96 up osd.6
-17 0.43950 - 450 GiB 139 GiB 137 GiB 67 MiB 2.1 GiB 311 GiB 30.97 0.82 - host mgmt-worker7
7 ssd 0.43950 1.00000 450 GiB 139 GiB 137 GiB 67 MiB 2.1 GiB 311 GiB 30.97 0.82 99 up osd.7
TOTAL 3.9 TiB 1.5 TiB 1.1 TiB 440 MiB 12 GiB 2.4 TiB 37.90
MIN/MAX VAR: 0.76/1.70 STDDEV: 11.50 Here is a post osd.0 resize screenshot from Ceph dashboard. In all 3 cases the used capacity appears to have increased by 400 GB, which is how much I increased the size of the virtual disk underlying osd.0. Looking a bit closer I see the use remained at 1.1 TB while the raw use increased to 1.5 TB. Does this get us closer to an answer? Looking back through my previous issue and at some other similar issues the |
I spun up an AWS test cluster and confirmed that I see the same behavior... The initial cluster has three OSDs:
After resizing, the OSD config is:
This would be a Ceph issue. Rook doesn't have any influence on the sizes the OSDs that are reported, and I don't see how the OSD resize could influence that incorrect raw size. Would you mind opening a Ceph tracker for this? |
@nizamial09 is this a knows issue? |
I got a response on Ceph issue 65659 stating it is probably the same issue as Ceph issue 63858. The suggested work around is Ceph issue 63858 note 7. I'm not sure how to apply this work around in Rook. I drained the node, marked the OSD out, rebooted the node, marked the OSD in, uncordoned the node, and waited for rebalance to complete. The used space did not change (i.e., go down by 400 GB). @travisn I'm happy to test this and confirm the work around, but I'm not sure how. Any ideas? |
[From Igor Fedotov](https://tracker.ceph.com/issues/65659#note-11)
|
Following Igor's suggestion worked as expected.
RAW USE is now the same size as DATA for OSD3.
The numbers still look off to me. Why is OSD3 smaller and has less PGs than the other 3? |
From the linked ceph tracker, since ceph/ceph#55777 was merged to reef this is expected to be fixed in v18.2.3. Good to see that the workaround with The |
Yeah, that seems like a reasonable guess.
Not sure how this is supposed to work. Do I manually specify the new weight? For example, if I want it to be the same the other OSDs then specify 0.83009? However, if I do that then the OSDs do not sum to 2.92978. Should I reweight all the OSDs to 2.92978/4=0.732445? Why is it not doing this automatically such as when a new OSD is created? |
|
I just went for it. Looks like it worked? Is it a coincidence that the SIZE and WEIGHT are approximately the same? I noticed that osd.3 is ever so slightly smaller than the others at a weight of 0.83008 vs 0.83009. 3.3/4=8.25 so maybe I should set them all to 0.82500?
|
By default, the weight of the OSD is based on the size, so this sounds expected. If it's off by such a small amount it shouldn't impact the PG placement enough to worry about. PGs will not be exactly perfectly distributed across OSDs anyway since it's based on hashing. |
@travisn really appreciate your help. I'm closing this one out. |
** Previous bug report for same issue. Only this time with a different OS, VMware controller, Kubernetes version, Rook version, and Ceph version. Where is the bug?! #12511**
Is this a bug report or feature request?
Deviation from expected behavior:
After resizing the underlying disk at the hypervisor and OS level resizing the OSD increases cluster total capacity and used capacity.
Expected behavior:
After resizing the underlying disk at the hypervisor and OS level resizing the OSD increases cluster total capacity and available capacity.
How to reproduce it (minimal and precise):
Build a Kubernetes cluster from virtual machines where Rook consumes virtual disks as OSDs. Resize a virtual disk used as an OSD at the hypervisor level. Resize the disk at the OS level. Resize the disk at the Ceph level (e.g., restart the OSD pod).
File(s) to submit:
cluster.yaml
, if necessary: rook-ceph.yaml.txtLogs to submit:
Cluster Status to submit:
Environment:
uname -a
): 6.1.74-talosrook version
inside of a Rook Pod): v1.13.3ceph -v
): v18.2.2kubectl version
): v1.29.1ceph health
in the Rook Ceph toolbox): HEALTH_OKThe text was updated successfully, but these errors were encountered: