> ## Content Index
> Fetch the complete content index at: https://greyhatguy007.win/llms.txt
> Use this file to discover other available public pages before exploring further.

# We fixed the inodes, but lost the data
- URL: https://greyhatguy007.win/we-fixed-the-inodes-but-lost-the-data/
- Published: 2026-11-24T19:26:13.000Z
- Updated: 2026-11-24T19:26:13.000Z
- Description: A postmortem on inode density, custom StorageClasses, and an undefined migration.
- Author: Ritvik Prasad
- Tags: SRE, Kubernetes, Vault, Storage, Incident-Response

It was a Friday night, just before midnight, when my phone lit up. The client was in a different time zone; for them it was still Friday afternoon. The QA lead and a client stakeholder were on the call. I was the only DevOps engineer online.

The client, a Nasdaq-listed company, had a bulk upload running in its QA environment. The UI was showing incomplete data. A batch of a thousand device records had gone in; roughly eight hundred came back. The rest were missing or stuck in an error state. No pod was crash-looping. No service was down. The Vault process was up and answering requests.

The call did not start with “the disk is full.” It started with “a component is failing and the UI isn’t showing useful data.” That framing sent me looking in the wrong place first. I started at the UI and walked the chain backwards: the UI called a service, that service called another service, and that second service fetched records from Vault.

The service logs looked fine. That was the first misleading detail. A partial response is still a response. The service was receiving data; it just wasn’t receiving all of it. I checked the UI pod logs. Clean. The first service. Clean. The second service. Clean enough to waste another twenty minutes. Every service said it had received data. None of them said it had received all of the data. I asked QA what exactly they were seeing. They had uploaded a batch, and only some of it appeared. The rest was missing or in an error state. The UI was the last link in the chain and the first place the problem showed up.

I went back through the callbacks. The UI had received everything the first service returned. The first service had received everything the second service returned. The second service had not received everything from Vault. That was the drop.

Then I found one line in the Vault logs:

```
no space left on device
```

I ran `df -h`. The filesystem was 30 percent full.

For a second I thought I was looking at the wrong volume. Then I remembered the flag I had not used. `df -h` measures bytes. It does not measure inodes. Every file and directory on a Linux filesystem consumes an inode, and a volume can have plenty of free bytes and no free inodes left. I ran `df -i`. Inode usage was 100 percent.

Each device record consumed three inodes. The PVC was 15 GiB. The QA team had been uploading records until the inode table ran out, and Vault had done what a lot of storage backends do when the filesystem refuses a write: it returned what it could and left the rest in a bad state. The missing records had not vanished; they had failed to land. Vault was not corrupt. It was not crashing. It was sitting on a full inode table and quietly returning incomplete results.

A crash would have been easier. A service that returns 80 percent of a batch looks healthy to every dashboard we had. The Vault process was green. The pods were green. The service logs were green. The only red thing was a number nobody had put on a dashboard. `df -h` is the check everyone runs. `df -i` is the one that mattered. The filesystem had free bytes; the inode table was full. That is a failure mode that does not show up in the panels most teams stare at.

I asked QA how much more data was coming that night. The answer was just over the remaining inode budget. The StorageClass had volume expansion enabled, so I expanded the PVC from 15 GiB to 30 GiB. The test went through. No corruption. The volume stayed readable. The fix was correct for the problem in front of me. I thought we had bought ourselves a week. We had bought ourselves a night.

The next day, QA asked for 3.5 million records.

## The math

Three inodes per record meant 10.5 million inodes. At the default ratio of one inode per 16 KiB, a volume would need to be around 160 GiB just to hold the inode table. That was a ridiculous amount of storage to provision for a QA load test.

I suggested XFS instead. XFS allocates inodes dynamically, so it would not hit a fixed inode ceiling the way ext4 does. Management said no. Changing the filesystem on a Vault volume meant a Vault-aware backup and restore, customer documentation, and a pause in QA testing. They wanted a fix that worked immediately. I understood the constraint, even if I did not love the answer. The irony is that the backup and restore management wanted to avoid was the exact thing that would have saved the data later.

The on-prem cluster ran RKE2 with Longhorn CSI. Longhorn gave us another lever. I built a custom StorageClass with a much denser inode ratio: one inode per 1 KiB instead of one per 16 KiB. A 20 GiB volume gave us roughly 20 million inodes, enough for 10.5 million records with headroom. The density problem was solved without changing the filesystem. I was proud of that fix. It was clean, it was cheap, and it did not require a Vault backup or a filesystem migration.

A StorageClass change is a data migration even when the YAML makes it look like a resize. On the disposable test cluster, I deleted the old PVC and recreated it with the new StorageClass. That was safe because the data in it was expendable. I want to be precise about that, because the same action was not safe later.

A day later, the same test was requested on GKE. We did not control the CSI driver there the way we did with Longhorn on-prem, so the inode ratio would not be as dense. I handed the context to another engineer. The handoff was deliberate; the team did not want one engineer as a single point of failure. That is a good instinct. The handoff just did not carry the constraint that made the on-prem deletion safe: the data was expendable.

I told him to migrate the volume. I did not define what that meant. I did not know the GKE environment held real QA data; I assumed it was another disposable test cluster.

Migration is a word with a destructive interpretation. He scaled Vault to zero, detached the PVC, deleted it, created a new PVC, bound it, and scaled Vault back up. The StorageClass’s reclaim policy was `Delete`. The persistent disk went with the PVC. Vault came up on an empty volume and initialized a new Raft backend.

There was no snapshot. No Vault dump. No copy of the old volume. The data was gone.

## The ticket said the wrong thing

The ticket came to me as data loss while increasing CPU, memory, and disk on GKE. The CPU and memory changes were irrelevant. QA thought the inodes had filled again after the GCP work, which was a reasonable guess from the symptom. It was the wrong layer.

The ticket was not lying. It was describing the last change QA had seen, not the operation that destroyed the data. A ticket is a narrative, and this one started with the wrong verb.

I built a reproduction cluster. I deployed the application scaled down, loaded records into Vault, and ran the scenarios one by one: expand the PVC while Vault was running; fill the inode table and then expand; migrate the data to a new StorageClass; expand after migration. In every scenario, the data survived. Nothing corrupted. The reproduction proved the StorageClass was safe. It also proved the handoff was not.

I still had not asked the other engineer whether he had deleted the PVC. I assumed “migrate” meant backup and restore. Then I asked for the exact commands he ran. Scale down. Detach. Delete. Create. Bind. Scale up. The sequence hit me like a truck.

Six lines. No malice. No shortcut. The other engineer was not careless. He followed a normal PVC replacement for a stateless service. Vault is not stateless. The failure was in the space between two people who both thought they were doing the safe thing.

This was persistent QA, not production. That kept it from being a customer outage. But it held real device records, and “not production” is not the same as “disposable.” I kept saying “not production” to myself. It did not make the loss less real. The records were gone.

## What I would do differently

I would define the migration before handing it off. Not “migrate the volume.” A migration needs a source, a target, a snapshot, a restore, a verification step, a cutover, and a rollback. It needs someone to say out loud: do not delete the source PVC until the target has been verified. I would write that into the ticket, not leave it in my head. I told him to migrate. I did not define what that meant. That is the part I own.

The custom StorageClass did exactly what I designed it to do. It gave us the inodes. It just could not give back the records that were on the volume when someone typed `delete pvc`.

It started on a Friday night with a call about a failing component. It ended with a ticket that named the wrong resource and a volume that had no data left to migrate.

**TL;DR:** A Vault volume had free bytes but no inodes, which made a bulk upload return partial data.  
The inode fix worked on-prem; on GKE, “migrate” became “delete the PVC,” and the records were gone.