Garage resync queue length just grows #934

Open
opened 2025-01-26 19:44:57 +00:00 by Szetty · 19 comments

Hello again,

I am back with a similar problem as before, but a slightly different behaviour. While the last problem was mostly related to new nodes, and resync not being fast enough, now these are probably not the problem; we did not change our Garage cluster at all, and I left the resync settings that were used to fix the previous problem (will show the settings below).

First of all an overview of all metrics: Screenshot 2025-01-26 at 21.32.43.png

We can observe that our previous problem mostly finished on 14th of January and it seems that data was synchronized correctly because all nodes now have similar free disk space (while the new ones started at ~7 TB and the old ones were reaching exhaustion, barely surviving at 100 GB and often being taken out of commission by k8s due to low disk size).

Not long after a new problem started, not sure why though: Screenshot 2025-01-26 at 21.40.46.png

Worker settings on the nodes:

kubectl exec --stdin --tty garage-5 -- /garage worker get
lifecycle-last-completed    2025-01-26
resync-tranquility          1
resync-worker-count         2
scrub-corruptions_detected  0
scrub-last-completed        2025-01-15T23:43:42.623Z
scrub-next-run              2025-02-17T12:13:42.623Z
scrub-tranquility           4
kubectl exec --stdin --tty garage-7 -- /garage worker get
lifecycle-last-completed    2025-01-26
resync-tranquility          1
resync-worker-count         2
scrub-corruptions_detected  0
scrub-last-completed        2025-01-13T07:46:31.272Z
scrub-next-run              2025-02-11T21:32:53.272Z
scrub-tranquility           4

Stats as seen from garage-5:

Garage version: v1.0.1 [features: k2v, lmdb, sqlite, consul-discovery, kubernetes-discovery, metrics, telemetry-otlp, bundled-libs]
Rust compiler version: 1.77.0

Database engine: LMDB (using Heed crate)

Table stats:
  Table      Items    MklItems  MklTodo  GcTodo
  bucket_v2  4        5         0        0
  key        4        5         0        0
  object     0        0         0        0
  version    4685153  6000678   0        0
  block_ref  8679784  11300284  0        1

Block manager stats:
  number of RC entries (~= number of blocks): 9397559
  resync queue length: 22932860
  blocks with resync errors: 132067

Storage nodes:
  ID                Hostname  Zone  Capacity  Part.  DataAvail              MetaAvail
  dd93d29d89331ec7  garage-7  hel1  6.0 TB    64     2.0 TB/7.6 TB (25.7%)  2.0 TB/7.6 TB (25.7%)
  a657965c7aaf3281  garage-4  fsn1  6.0 TB    64     1.9 TB/7.6 TB (25.1%)  1.9 TB/7.6 TB (25.1%)
  da04daee442cc468  garage-1  hel1  6.0 TB    64     2.0 TB/7.6 TB (26.4%)  2.0 TB/7.6 TB (26.4%)
  8b4e87778d470a0b  garage-6  hel1  6.0 TB    64     1.9 TB/7.6 TB (25.3%)  1.9 TB/7.6 TB (25.3%)
  6491f54b516fe740  garage-3  hel1  6.0 TB    64     2.0 TB/7.6 TB (25.7%)  2.0 TB/7.6 TB (25.7%)
  fecb40744431de50  garage-2  fsn1  6.0 TB    64     1.9 TB/7.6 TB (24.6%)  1.9 TB/7.6 TB (24.6%)
  b38df7f1cd6e64cc  garage-5  fsn1  6.0 TB    64     1.9 TB/7.6 TB (25.6%)  1.9 TB/7.6 TB (25.6%)
  c5a65adbdbfcabd8  garage-0  fsn1  6.0 TB    64     1.9 TB/7.6 TB (24.9%)  1.9 TB/7.6 TB (24.9%)

Estimated available storage space cluster-wide (might be lower in practice):
  data: 7.5 TB
  metadata: 7.5 TB

Any ideas what could be going on ? Do you need any more information ?

Thank you.

With respect,
Arnold

Hello again, I am back with a similar problem as before, but a slightly different behaviour. While the last problem was mostly related to new nodes, and resync not being fast enough, now these are probably not the problem; we did not change our Garage cluster at all, and I left the resync settings that were used to fix the previous problem (will show the settings below). First of all an overview of all metrics: ![Screenshot 2025-01-26 at 21.32.43.png](/attachments/9a9e102e-19ad-44df-b54c-8afa378afa14) We can observe that our previous problem mostly finished on 14th of January and it seems that data was synchronized correctly because all nodes now have similar free disk space (while the new ones started at ~7 TB and the old ones were reaching exhaustion, barely surviving at 100 GB and often being taken out of commission by k8s due to low disk size). Not long after a new problem started, not sure why though: ![Screenshot 2025-01-26 at 21.40.46.png](/attachments/a5256963-586d-4f37-aed4-dade1b1c18b8) Worker settings on the nodes: ``` kubectl exec --stdin --tty garage-5 -- /garage worker get lifecycle-last-completed 2025-01-26 resync-tranquility 1 resync-worker-count 2 scrub-corruptions_detected 0 scrub-last-completed 2025-01-15T23:43:42.623Z scrub-next-run 2025-02-17T12:13:42.623Z scrub-tranquility 4 ``` ``` kubectl exec --stdin --tty garage-7 -- /garage worker get lifecycle-last-completed 2025-01-26 resync-tranquility 1 resync-worker-count 2 scrub-corruptions_detected 0 scrub-last-completed 2025-01-13T07:46:31.272Z scrub-next-run 2025-02-11T21:32:53.272Z scrub-tranquility 4 ``` Stats as seen from garage-5: ``` Garage version: v1.0.1 [features: k2v, lmdb, sqlite, consul-discovery, kubernetes-discovery, metrics, telemetry-otlp, bundled-libs] Rust compiler version: 1.77.0 Database engine: LMDB (using Heed crate) Table stats: Table Items MklItems MklTodo GcTodo bucket_v2 4 5 0 0 key 4 5 0 0 object 0 0 0 0 version 4685153 6000678 0 0 block_ref 8679784 11300284 0 1 Block manager stats: number of RC entries (~= number of blocks): 9397559 resync queue length: 22932860 blocks with resync errors: 132067 Storage nodes: ID Hostname Zone Capacity Part. DataAvail MetaAvail dd93d29d89331ec7 garage-7 hel1 6.0 TB 64 2.0 TB/7.6 TB (25.7%) 2.0 TB/7.6 TB (25.7%) a657965c7aaf3281 garage-4 fsn1 6.0 TB 64 1.9 TB/7.6 TB (25.1%) 1.9 TB/7.6 TB (25.1%) da04daee442cc468 garage-1 hel1 6.0 TB 64 2.0 TB/7.6 TB (26.4%) 2.0 TB/7.6 TB (26.4%) 8b4e87778d470a0b garage-6 hel1 6.0 TB 64 1.9 TB/7.6 TB (25.3%) 1.9 TB/7.6 TB (25.3%) 6491f54b516fe740 garage-3 hel1 6.0 TB 64 2.0 TB/7.6 TB (25.7%) 2.0 TB/7.6 TB (25.7%) fecb40744431de50 garage-2 fsn1 6.0 TB 64 1.9 TB/7.6 TB (24.6%) 1.9 TB/7.6 TB (24.6%) b38df7f1cd6e64cc garage-5 fsn1 6.0 TB 64 1.9 TB/7.6 TB (25.6%) 1.9 TB/7.6 TB (25.6%) c5a65adbdbfcabd8 garage-0 fsn1 6.0 TB 64 1.9 TB/7.6 TB (24.9%) 1.9 TB/7.6 TB (24.9%) Estimated available storage space cluster-wide (might be lower in practice): data: 7.5 TB metadata: 7.5 TB ``` Any ideas what could be going on ? Do you need any more information ? Thank you. With respect, Arnold
Owner

Maybe taking a look at the logs on those nodes would be interesting. I suspect they maybe have some kind of connectivity issue that prevent garage from syncing blocks from other nodes and causing the resync queue to blow up.

Maybe taking a look at the logs on those nodes would be interesting. I suspect they maybe have some kind of connectivity issue that prevent garage from syncing blocks from other nodes and causing the resync queue to blow up.
maximilien added the
action
more-info-needed
label 2025-01-27 10:36:06 +00:00
Owner

Closing this for now, please reopen it if needed

Closing this for now, please reopen it if needed
Szetty reopened this issue 2025-03-07 08:56:31 +00:00
Author

Finally had time to check logs, the problem is still going on and the resync queue is just growing bigger and bigger.

So for the two nodes where we have problems (garage-5 and garage-7) I will provide an error log volume to show when and how errors started and then a snapshot of all logs (info, warn and error) on both when the errors started.

For garage-5: garage-5 logs when errors started.txt and garage-5 - errors.png

For garage-7: garage-7 logs when errors started.txt and garage-7 errors.png

Please tell me if you need more information or how to investigate next. Thank you.

Finally had time to check logs, the problem is still going on and the resync queue is just growing bigger and bigger. So for the two nodes where we have problems (garage-5 and garage-7) I will provide an error log volume to show when and how errors started and then a snapshot of all logs (info, warn and error) on both when the errors started. For garage-5: [garage-5 logs when errors started.txt](/attachments/841da216-fbdf-4967-a52c-92d48d1274f4) and ![garage-5 - errors.png](/attachments/e531b49d-639e-444f-81d1-21e10b806043) For garage-7: [garage-7 logs when errors started.txt](/attachments/3bdc9276-97bd-4956-bbe3-90661d5c57fc) and ![garage-7 errors.png](/attachments/66e1f576-1c6e-4249-baa0-7747a14f6f6b) Please tell me if you need more information or how to investigate next. Thank you.
Author

@maximilien any ideas ?

@maximilien any ideas ?
Author

@maximilien any updates ?

@maximilien any updates ?
Owner

Just came back from travel. Your last set of screenshots confirm what the resync queue is showing: those nodes don't seem to be able to get those blocks anywhere, or they have a corrupted refcount. Can you provide the layout of the cluster? What's the replication count? You can use garage layout show.

I'm also worried that in the current situation your resync queue is going to blow up. Can you provide updates data/screenshot to see how it evolved? I'm specifically interested in recent numbers and not necessarily the past. Having the last 7 days should be enough.

As a sanity check, could you also provide the output of garage block info 072285974ac26607. The block ID is from the garage-5 log lines:

2025-01-14 19:56:33.226	2025-01-14T17:56:33.226325Z  INFO garage_block::resync: Resync block 072285974ac26607: fetching absent but needed block (refcount > 0)
2025-01-14 19:56:33.279	2025-01-14T17:56:33.279350Z  WARN garage_block::resync: Could not fetch needed block 072285974ac26607, no node returned valid data. Checking that refcount is correct.
2025-01-14 19:56:33.279	2025-01-14T17:56:33.279435Z ERROR garage_block::resync: Error when resyncing 072285974ac26607: Missing block 072285974ac26607: no node returned a valid block

The idea here would be to validate if:

  • that file should be here or not (was it deleted?)
  • if you can query if from another node

This should allow us to narrow down the issue.

Just came back from travel. Your last set of screenshots confirm what the resync queue is showing: those nodes don't seem to be able to get those blocks anywhere, or they have a corrupted refcount. Can you provide the layout of the cluster? What's the replication count? You can use `garage layout show`. I'm also worried that in the current situation your resync queue is going to blow up. Can you provide updates data/screenshot to see how it evolved? I'm specifically interested in recent numbers and not necessarily the past. Having the last 7 days should be enough. As a sanity check, could you also provide the output of `garage block info 072285974ac26607`. The block ID is from the garage-5 log lines: ``` 2025-01-14 19:56:33.226 2025-01-14T17:56:33.226325Z INFO garage_block::resync: Resync block 072285974ac26607: fetching absent but needed block (refcount > 0) 2025-01-14 19:56:33.279 2025-01-14T17:56:33.279350Z WARN garage_block::resync: Could not fetch needed block 072285974ac26607, no node returned valid data. Checking that refcount is correct. 2025-01-14 19:56:33.279 2025-01-14T17:56:33.279435Z ERROR garage_block::resync: Error when resyncing 072285974ac26607: Missing block 072285974ac26607: no node returned a valid block ``` The idea here would be to validate if: - that file should be here or not (was it deleted?) - if you can query if from another node This should allow us to narrow down the issue.
Author

kubectl exec --stdin --tty garage-5 -- /garage layout show

==== CURRENT CLUSTER LAYOUT ====
ID                Tags      Zone  Capacity  Usable capacity
6491f54b516fe740  garage-3  hel1  6.0 TB    6.0 TB (100.0%)
8b4e87778d470a0b  garage-6  hel1  6.0 TB    6.0 TB (100.0%)
a657965c7aaf3281  garage-4  fsn1  6.0 TB    6.0 TB (100.0%)
b38df7f1cd6e64cc  garage-5  fsn1  6.0 TB    6.0 TB (100.0%)
c5a65adbdbfcabd8  garage-0  fsn1  6.0 TB    6.0 TB (100.0%)
da04daee442cc468  garage-1  hel1  6.0 TB    6.0 TB (100.0%)
dd93d29d89331ec7  garage-7  hel1  6.0 TB    6.0 TB (100.0%)
fecb40744431de50  garage-2  fsn1  6.0 TB    6.0 TB (100.0%)

Zone redundancy: maximum

Current cluster layout version: 4

kubectl exec --stdin --tty garage-5 -- /garage stats

Defaulted container "garage" out of: garage, garage-init (init)
2025-03-19T11:10:10.634249Z  INFO garage_net::netapp: Connected to 127.0.0.1:3901, negotiating handshake...
2025-03-19T11:10:10.677005Z  INFO garage_net::netapp: Connection established to b38df7f1cd6e64cc

Garage version: v1.0.1 [features: k2v, lmdb, sqlite, consul-discovery, kubernetes-discovery, metrics, telemetry-otlp, bundled-libs]
Rust compiler version: 1.77.0

Database engine: LMDB (using Heed crate)

Table stats:
  Table      Items    MklItems  MklTodo  GcTodo
  bucket_v2  4        5         0        0
  key        4        5         0        0
  object     0        0         0        0
  version    4857171  6236253   0        1
  block_ref  9003140  11708804  0        4

Block manager stats:
  number of RC entries (~= number of blocks): 9723551
  resync queue length: 116714159
  blocks with resync errors: 131976

Storage nodes:
  ID                Hostname  Zone  Capacity  Part.  DataAvail              MetaAvail
  8b4e87778d470a0b  garage-6  hel1  6.0 TB    64     1.7 TB/7.6 TB (22.6%)  1.7 TB/7.6 TB (22.6%)
  c5a65adbdbfcabd8  garage-0  fsn1  6.0 TB    64     1.7 TB/7.6 TB (22.3%)  1.7 TB/7.6 TB (22.3%)
  dd93d29d89331ec7  garage-7  hel1  6.0 TB    64     1.7 TB/7.6 TB (22.9%)  1.7 TB/7.6 TB (22.9%)
  a657965c7aaf3281  garage-4  fsn1  6.0 TB    64     1.6 TB/7.6 TB (21.4%)  1.6 TB/7.6 TB (21.4%)
  da04daee442cc468  garage-1  hel1  6.0 TB    64     1.8 TB/7.6 TB (23.9%)  1.8 TB/7.6 TB (23.9%)
  fecb40744431de50  garage-2  fsn1  6.0 TB    64     1.7 TB/7.6 TB (22.1%)  1.7 TB/7.6 TB (22.1%)
  6491f54b516fe740  garage-3  hel1  6.0 TB    64     1.8 TB/7.6 TB (23.2%)  1.8 TB/7.6 TB (23.2%)
  b38df7f1cd6e64cc  garage-5  fsn1  6.0 TB    64     1.8 TB/7.6 TB (23.0%)  1.8 TB/7.6 TB (23.0%)

Estimated available storage space cluster-wide (might be lower in practice):
  data: 6.5 TB
  metadata: 6.5 TB

Only garage-5 and garage-7 (the two problematic nodes) have the block:
kubectl exec --stdin --tty garage-7 -- /garage block info 072285974ac26607

Block hash: 072285974ac26607244181aff8b3e6989e85b43626e699249b4efe961190be63
Refcount: 1

Version           Bucket            Key                                                               MPU  Deleted
b290a580cf0953b7  34ffe40ab52d0c24  f2f262764aa36e1d83be89c4893413b492ea3fed3769e69cfceba699e3ef96dc       false

Evolution of resync queue size for last 7 days:
image

**kubectl exec --stdin --tty garage-5 -- /garage layout show** ``` ==== CURRENT CLUSTER LAYOUT ==== ID Tags Zone Capacity Usable capacity 6491f54b516fe740 garage-3 hel1 6.0 TB 6.0 TB (100.0%) 8b4e87778d470a0b garage-6 hel1 6.0 TB 6.0 TB (100.0%) a657965c7aaf3281 garage-4 fsn1 6.0 TB 6.0 TB (100.0%) b38df7f1cd6e64cc garage-5 fsn1 6.0 TB 6.0 TB (100.0%) c5a65adbdbfcabd8 garage-0 fsn1 6.0 TB 6.0 TB (100.0%) da04daee442cc468 garage-1 hel1 6.0 TB 6.0 TB (100.0%) dd93d29d89331ec7 garage-7 hel1 6.0 TB 6.0 TB (100.0%) fecb40744431de50 garage-2 fsn1 6.0 TB 6.0 TB (100.0%) Zone redundancy: maximum Current cluster layout version: 4 ``` **kubectl exec --stdin --tty garage-5 -- /garage stats** ``` Defaulted container "garage" out of: garage, garage-init (init) 2025-03-19T11:10:10.634249Z INFO garage_net::netapp: Connected to 127.0.0.1:3901, negotiating handshake... 2025-03-19T11:10:10.677005Z INFO garage_net::netapp: Connection established to b38df7f1cd6e64cc Garage version: v1.0.1 [features: k2v, lmdb, sqlite, consul-discovery, kubernetes-discovery, metrics, telemetry-otlp, bundled-libs] Rust compiler version: 1.77.0 Database engine: LMDB (using Heed crate) Table stats: Table Items MklItems MklTodo GcTodo bucket_v2 4 5 0 0 key 4 5 0 0 object 0 0 0 0 version 4857171 6236253 0 1 block_ref 9003140 11708804 0 4 Block manager stats: number of RC entries (~= number of blocks): 9723551 resync queue length: 116714159 blocks with resync errors: 131976 Storage nodes: ID Hostname Zone Capacity Part. DataAvail MetaAvail 8b4e87778d470a0b garage-6 hel1 6.0 TB 64 1.7 TB/7.6 TB (22.6%) 1.7 TB/7.6 TB (22.6%) c5a65adbdbfcabd8 garage-0 fsn1 6.0 TB 64 1.7 TB/7.6 TB (22.3%) 1.7 TB/7.6 TB (22.3%) dd93d29d89331ec7 garage-7 hel1 6.0 TB 64 1.7 TB/7.6 TB (22.9%) 1.7 TB/7.6 TB (22.9%) a657965c7aaf3281 garage-4 fsn1 6.0 TB 64 1.6 TB/7.6 TB (21.4%) 1.6 TB/7.6 TB (21.4%) da04daee442cc468 garage-1 hel1 6.0 TB 64 1.8 TB/7.6 TB (23.9%) 1.8 TB/7.6 TB (23.9%) fecb40744431de50 garage-2 fsn1 6.0 TB 64 1.7 TB/7.6 TB (22.1%) 1.7 TB/7.6 TB (22.1%) 6491f54b516fe740 garage-3 hel1 6.0 TB 64 1.8 TB/7.6 TB (23.2%) 1.8 TB/7.6 TB (23.2%) b38df7f1cd6e64cc garage-5 fsn1 6.0 TB 64 1.8 TB/7.6 TB (23.0%) 1.8 TB/7.6 TB (23.0%) Estimated available storage space cluster-wide (might be lower in practice): data: 6.5 TB metadata: 6.5 TB ``` Only garage-5 and garage-7 (the two problematic nodes) have the block: **kubectl exec --stdin --tty garage-7 -- /garage block info 072285974ac26607** ``` Block hash: 072285974ac26607244181aff8b3e6989e85b43626e699249b4efe961190be63 Refcount: 1 Version Bucket Key MPU Deleted b290a580cf0953b7 34ffe40ab52d0c24 f2f262764aa36e1d83be89c4893413b492ea3fed3769e69cfceba699e3ef96dc false ``` Evolution of resync queue size for last 7 days: ![image](/attachments/cf9fc27d-5b13-4aa1-b0dd-930b2aa4979a)
125 KiB
Owner

Could you post the output of garage layout history as well?

Could you post the output of `garage layout history` as well?
Author

@lx wrote in #934 (comment):

Could you post the output of garage layout history as well?

sure

kubectl exec --stdin --tty garage-5 -- /garage layout history

==== LAYOUT HISTORY ====
Version  Status      Storage nodes  Gateway nodes
#4       current     8              0
#3       historical  6              0
#2       historical  6              0
#1       historical  4              0

Your cluster is currently in a stable state with a single live layout version.
No metadata migration is in progress. Note that the migration of data blocks is not tracked,
so you might want to keep old nodes online until their data directories become empty.
@lx wrote in https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/934#issuecomment-12178: > Could you post the output of `garage layout history` as well? sure **kubectl exec --stdin --tty garage-5 -- /garage layout history** ``` ==== LAYOUT HISTORY ==== Version Status Storage nodes Gateway nodes #4 current 8 0 #3 historical 6 0 #2 historical 6 0 #1 historical 4 0 Your cluster is currently in a stable state with a single live layout version. No metadata migration is in progress. Note that the migration of data blocks is not tracked, so you might want to keep old nodes online until their data directories become empty. ```
Owner

Concerning this output:

kubectl exec --stdin --tty garage-7 -- /garage block info 072285974ac26607

Block hash: 072285974ac26607244181aff8b3e6989e85b43626e699249b4efe961190be63
Refcount: 1

Version           Bucket            Key                                                               MPU  Deleted
b290a580cf0953b7  34ffe40ab52d0c24  f2f262764aa36e1d83be89c4893413b492ea3fed3769e69cfceba699e3ef96dc       false

It seems to indicate that block 0722... belongs to an live object, currently stored in your cluster. The fact that your Garage node cannot fetch it from other nodes might mean that it is entirely absent from the cluster, but it could also just be that the file is somewhere where Garage is not able to find it.

Can you check:

  1. Whether the referenced object exists when listing objects in the bucket through the S3 API? (object called f2f262764aa36e1d83be89c4893413b492ea3fed3769e69cfceba699e3ef96dc in bucket whose full ID starts with 34ffe40ab52d0c24)
  2. Whether the referenced object can be fetched successfully through the S3 API? It might either return an internal error or in some cases it could just return a truncated object, so make sure to verify that the length of the data is of the announced size.
  3. Whether the file 072285974ac26607244181aff8b3e6989e85b43626e699249b4efe961190be63 can be found in a data directory of any node of your cluster? It should be in <data_dir>/07/22/, and it possibly has a .zst extension if you have compression enabled.

Moreover, do you have any Garage node that is configured to use multiple data directories ?

Concerning this output: > kubectl exec --stdin --tty garage-7 -- /garage block info 072285974ac26607 > ``` > Block hash: 072285974ac26607244181aff8b3e6989e85b43626e699249b4efe961190be63 > Refcount: 1 > > Version Bucket Key MPU Deleted > b290a580cf0953b7 34ffe40ab52d0c24 f2f262764aa36e1d83be89c4893413b492ea3fed3769e69cfceba699e3ef96dc false > ``` It seems to indicate that block `0722...` belongs to an live object, currently stored in your cluster. The fact that your Garage node cannot fetch it from other nodes might mean that it is entirely absent from the cluster, but it could also just be that the file is somewhere where Garage is not able to find it. Can you check: 1. Whether the referenced object exists when listing objects in the bucket through the S3 API? (object called `f2f262764aa36e1d83be89c4893413b492ea3fed3769e69cfceba699e3ef96dc` in bucket whose full ID starts with `34ffe40ab52d0c24`) 2. Whether the referenced object can be fetched successfully through the S3 API? It might either return an internal error or in some cases it could just return a truncated object, so make sure to verify that the length of the data is of the announced size. 3. Whether the file `072285974ac26607244181aff8b3e6989e85b43626e699249b4efe961190be63` can be found in a data directory of any node of your cluster? It should be in `<data_dir>/07/22/`, and it possibly has a `.zst` extension if you have compression enabled. Moreover, do you have any Garage node that is configured to use [multiple data directories](https://garagehq.deuxfleurs.fr/documentation/operations/multi-hdd/) ?
Owner

If the answer to question 1 is that the object no longer exists in the bucket, or that the current version is not version b290a580cf0953b7 but a newer version, you might just be in the case of an internal inconsistency where version b290a580cf0953b7 has not properly been marked as deleted, even though it is no longer the current version of the object.

To fix such inconsistencies, please run the following two repair procedures:

garage repair -a --yes block-refs
garage repair -a --yes versions

Note that these repair procedures take a long time to run (you can watch them using garage worker list/garage worker info), and they are interrupted and not restarted automatically if your Garage daemon restarts. So to ensure that they run to completion, check that your Garage daemons are not restarted by k8s, and monitor the logs for any message indicating completion of the repair procedure.

If the answer to question 1 is that the object no longer exists in the bucket, or that the current version is not version `b290a580cf0953b7` but a newer version, you might just be in the case of an internal inconsistency where version `b290a580cf0953b7` has not properly been marked as deleted, even though it is no longer the current version of the object. To fix such inconsistencies, please run the following two repair procedures: ``` garage repair -a --yes block-refs garage repair -a --yes versions ``` Note that these repair procedures take a long time to run (you can watch them using `garage worker list`/`garage worker info`), and they are interrupted and not restarted automatically if your Garage daemon restarts. So to ensure that they run to completion, check that your Garage daemons are not restarted by k8s, and monitor the logs for any message indicating completion of the repair procedure.
Author

Whether the referenced object exists when listing objects in the bucket through the S3 API? (object called f2f262764aa36e1d83be89c4893413b492ea3fed3769e69cfceba699e3ef96dc in bucket whose full ID starts with 34ffe40ab52d0c24)
Whether the referenced object can be fetched successfully through the S3 API? It might either return an internal error or in some cases it could just return a truncated object, so make sure to verify that the length of the data is of the announced size.

Not entirely sure how to do this, I tried head_object, with the right bucket, but not sure what to put as object_path, if the key f2f262764aa36e1d83be89c4893413b492ea3fed3769e69cfceba699e3ef96dc is the entire object path, it returns 404

Whether the file 072285974ac26607244181aff8b3e6989e85b43626e699249b4efe961190be63 can be found in a data directory of any node of your cluster? It should be in <data_dir>/07/22/, and it possibly has a .zst extension if you have compression enabled.

I have found the folder on 4 nodes, 2 of them are empty, and 2 of them have many files, but not 072285974ac26607244181aff8b3e6989e85b43626e699249b4efe961190be63.zst

Moreover, do you have any Garage node that is configured to use multiple data directories ?

Did not know about "Multi-HDD support" until now, so if it is not the default, I am pretty sure it is not enabled

I think I know what happened, I forgot about this, but at some point when we were very low on disk size, I have deleted some folders directly from the disk, thinking that it would be rewritten as we use Garage for backup, maybe this messed up some internal tracking of the data, any idea how to synchronize the metadata based on the data ?

> Whether the referenced object exists when listing objects in the bucket through the S3 API? (object called f2f262764aa36e1d83be89c4893413b492ea3fed3769e69cfceba699e3ef96dc in bucket whose full ID starts with 34ffe40ab52d0c24) Whether the referenced object can be fetched successfully through the S3 API? It might either return an internal error or in some cases it could just return a truncated object, so make sure to verify that the length of the data is of the announced size. Not entirely sure how to do this, I tried head_object, with the right bucket, but not sure what to put as object_path, if the key `f2f262764aa36e1d83be89c4893413b492ea3fed3769e69cfceba699e3ef96dc` is the entire object path, it returns 404 > Whether the file 072285974ac26607244181aff8b3e6989e85b43626e699249b4efe961190be63 can be found in a data directory of any node of your cluster? It should be in <data_dir>/07/22/, and it possibly has a .zst extension if you have compression enabled. I have found the folder on 4 nodes, 2 of them are empty, and 2 of them have many files, but not `072285974ac26607244181aff8b3e6989e85b43626e699249b4efe961190be63.zst` > Moreover, do you have any Garage node that is configured to use multiple data directories ? Did not know about "Multi-HDD support" until now, so if it is not the default, I am pretty sure it is not enabled **I think I know what happened, I forgot about this, but at some point when we were very low on disk size, I have deleted some folders directly from the disk, thinking that it would be rewritten as we use Garage for backup, maybe this messed up some internal tracking of the data, any idea how to synchronize the metadata based on the data ?**
Owner

Ok, I think launching the two repair procedures I mentioned above and giving them enough time to finish should fix your issue.

Ok, I think launching the two repair procedures I mentioned above and giving them enough time to finish should fix your issue.
maximilien added the
scope
documentation
label 2025-03-24 08:49:59 +00:00
Author

Ok, I have launched the two repair procedures, and they seem to be finished, but issue is still there, will leave you seem console output to see.

❯ kubectl exec --stdin --tty garage-5 -- /garage repair -a --yes block-refs

2025-03-22T16:11:15.481625Z  INFO garage_net::netapp: Connected to 127.0.0.1:3901, negotiating handshake...
2025-03-22T16:11:15.524513Z  INFO garage_net::netapp: Connection established to b38df7f1cd6e64cc
Repair launched on all nodes

❯ kubectl exec --stdin --tty garage-5 -- /garage repair -a --yes versions

2025-03-22T16:11:27.897578Z  INFO garage_net::netapp: Connected to 127.0.0.1:3901, negotiating handshake...
2025-03-22T16:11:27.940479Z  INFO garage_net::netapp: Connection established to b38df7f1cd6e64cc
Repair launched on all nodes

Then a bit later:
❯ kubectl exec --stdin --tty garage-5 -- /garage worker info 55

2025-03-23T18:10:43.507864Z  INFO garage_net::netapp: Connected to 127.0.0.1:3901, negotiating handshake...
2025-03-23T18:10:43.552535Z  INFO garage_net::netapp: Connection established to b38df7f1cd6e64cc
Task id:           55
Worker name:       block_ref repair worker
Worker state:      Done

Total errors:      0
Consecutive errs:  0

Progress:          9017301 (703)

❯ kubectl exec --stdin --tty garage-5 -- /garage worker info 56

2025-03-23T18:10:38.093884Z  INFO garage_net::netapp: Connected to 127.0.0.1:3901, negotiating handshake...
2025-03-23T18:10:38.136526Z  INFO garage_net::netapp: Connection established to b38df7f1cd6e64cc
Task id:           56
Worker name:       version repair worker
Worker state:      Done

Total errors:      0
Consecutive errs:  0

Progress:          4864213 (0)
Ok, I have launched the two repair procedures, and they seem to be finished, but issue is still there, will leave you seem console output to see. ❯ kubectl exec --stdin --tty garage-5 -- /garage repair -a --yes block-refs ``` 2025-03-22T16:11:15.481625Z INFO garage_net::netapp: Connected to 127.0.0.1:3901, negotiating handshake... 2025-03-22T16:11:15.524513Z INFO garage_net::netapp: Connection established to b38df7f1cd6e64cc Repair launched on all nodes ``` ❯ kubectl exec --stdin --tty garage-5 -- /garage repair -a --yes versions ``` 2025-03-22T16:11:27.897578Z INFO garage_net::netapp: Connected to 127.0.0.1:3901, negotiating handshake... 2025-03-22T16:11:27.940479Z INFO garage_net::netapp: Connection established to b38df7f1cd6e64cc Repair launched on all nodes ``` Then a bit later: ❯ kubectl exec --stdin --tty garage-5 -- /garage worker info 55 ``` 2025-03-23T18:10:43.507864Z INFO garage_net::netapp: Connected to 127.0.0.1:3901, negotiating handshake... 2025-03-23T18:10:43.552535Z INFO garage_net::netapp: Connection established to b38df7f1cd6e64cc Task id: 55 Worker name: block_ref repair worker Worker state: Done Total errors: 0 Consecutive errs: 0 Progress: 9017301 (703) ``` ❯ kubectl exec --stdin --tty garage-5 -- /garage worker info 56 ``` 2025-03-23T18:10:38.093884Z INFO garage_net::netapp: Connected to 127.0.0.1:3901, negotiating handshake... 2025-03-23T18:10:38.136526Z INFO garage_net::netapp: Connection established to b38df7f1cd6e64cc Task id: 56 Worker name: version repair worker Worker state: Done Total errors: 0 Consecutive errs: 0 Progress: 4864213 (0) ```
Author

@maximilien @lx any more ideas ?

@maximilien @lx any more ideas ?
Owner

@Szetty I'd say we are in either of two cases:

  1. your metadata is corrupted somehow on those two nodes and Garage thinks it needs some data blocks which it doesn't need, or which are not at their correct location
  2. some data blocks are indeed missing from your cluster

To test hypothesis 1, you could try wiping the db from one of your two nodes so that it will be rebuilt from the cluster, and see if that fixes the issue. The procedure would be something like:

  1. select one of the two faulty nodes to run the procedure on
  2. shut it down
  3. back up db.lmdb in the metadata directory to a separate location
  4. remove db.lmdb in the metadata directory (do not remove other files such as cluster_layout, node_id, etc)
  5. restart the node
  6. check that node appears correctly in garage status and that its role has not changed
  7. wait for the resync to complete
  8. check status of the rebuilt node

If that does not fix the issue, that probably means that you are in case 2 and some data files could have been lost. In that case, we would have to look for evidence that some of your objects are indeed unreadable due to missing data blocks, which we don't have at the moment.

@Szetty I'd say we are in either of two cases: 1. your metadata is corrupted somehow on those two nodes and Garage thinks it needs some data blocks which it doesn't need, or which are not at their correct location 2. some data blocks are indeed missing from your cluster To test hypothesis 1, you could try wiping the db from one of your two nodes so that it will be rebuilt from the cluster, and see if that fixes the issue. The procedure would be something like: 1. select one of the two faulty nodes to run the procedure on 2. shut it down 3. back up `db.lmdb` in the metadata directory to a separate location 4. remove `db.lmdb` in the metadata directory (do not remove other files such as `cluster_layout`, `node_id`, etc) 5. restart the node 6. check that node appears correctly in `garage status` and that its role has not changed 7. wait for the resync to complete 8. check status of the rebuilt node If that does not fix the issue, that probably means that you are in case 2 and some data files could have been lost. In that case, we would have to look for evidence that some of your objects are indeed unreadable due to missing data blocks, which we don't have at the moment.
Author

okay, so I have tried the first option, and it seems that it is not solving the issue, I will attach the resync queue size and the resync error blocks count. The errors are back to the value before, and the queue is steadily growing too.

Resync errors: resync queue errors.png
Resync queue: resync queue length.png

okay, so I have tried the first option, and it seems that it is not solving the issue, I will attach the resync queue size and the resync error blocks count. The errors are back to the value before, and the queue is steadily growing too. Resync errors: ![resync queue errors.png](/attachments/2916d1f4-883a-4ecd-bc13-4d9f1c8e3870) Resync queue: ![resync queue length.png](/attachments/8383a557-4f29-4d2e-987c-2ad97a6f6bf0)
Author

@maximilien @lx what should we do next ?

@maximilien @lx what should we do next ?
Owner

If you are certain that the missing blocks do not correspond to objects stored in the cluster that you or your users might one day want to access, you may use garage block purge to inform Garage that those blocks are not needed anymore and that it can safely skip resyncing them. Use garage block list-errors to fetch the list of blocks in an error state, and feed that list as an argument into garage block purge.

If you do so, please report the output of garage block purge ("purged x blocks, x versions, x objects, etc")

If you are certain that the missing blocks do not correspond to objects stored in the cluster that you or your users might one day want to access, you may use `garage block purge` to inform Garage that those blocks are not needed anymore and that it can safely skip resyncing them. Use `garage block list-errors` to fetch the list of blocks in an error state, and feed that list as an argument into `garage block purge`. If you do so, please report the output of `garage block purge` ("purged x blocks, x versions, x objects, etc")
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#934
No description provided.