Skip to content
← Back to writing

September 29, 2026

The backup server had never deleted anything

Moving 832 GB of backups off a full system disk on the R730xd, and finding out along the way why the disk kept filling.

The backup server for my fleet runs on the R730xd at 192.168.1.210. On Tuesday its data lived in a Docker volume on the 916 GB system SSD, and that SSD was at 100 percent with zero bytes free. The scheduled backups from .73, .49 and .31 had all failed the night before. Ten days earlier I had measured 120 GB written to it in a single day, across 490,459 files, and I had no good explanation for that number. The job for the day was simple to state: get the data somewhere with room, prove the copy is exact, and get backups landing again.

Real evidence from .210 on 29 September: the system disk at 100 percent holding 832G of backup data, then the copy onto the array verified by file count, byte count, a 300-file checksum sample and a full checksum dry run.

Where the data was going

The R730xd already had an array waiting for it. On 19 September I built one from the Storage screens out of the disks that box had been hiding behind an old RAID config: four data disks, one 1.1 TB parity disk, and two SSDs as a cache pool. Then I stopped, because the first copy attempt that night ran eight parallel jobs, pushed the fans to 50 percent in my room, and knocked a CI build over on the same machine. The backup server went back on exactly as it was, still writing to the system disk it had already filled.

So Tuesday started with the server stopped again, since it could not write anyway, a full disk, and a copy that had to happen without cooking anything.

Why the union was so slow

The obvious way to copy onto the array is through the mergerfs mount at /mnt/array. I had Claude try that first. It ran at about 73 files a second, which works out to roughly 13 hours for the whole store.

I asked whether FUSE is normally that slow. The answer was partly yes. This data is the worst case for a user-space filesystem: 3.4 million chunk files averaging about 250 KB each. For every file, rsync checks whether it exists, creates it, writes it, sets owner and permissions, sets extended attributes, and renames it into place, and each of those is a round trip from the kernel out to the mergerfs process and back. Large media files hide that overhead, and millions of small ones expose all of it.

The box's own settings made it worse, read straight from the array's control file. Free-space checks are not cached, and with a 20 GB minimum free space set, every new file triggers a free-space check across all five branches. Lookups for files that do not exist yet are not cached either, so every "is this here?" from rsync went to the process. Extended attributes pass straight through. There is no write-back cache.

The fix was to stop going through the union at all. The chunk store is split into 65,536 directories named by hex prefix, so Claude ran four rsyncs straight onto the four data disks, one per range of prefixes. That ran at about 25 GB a minute, and the estimate dropped from 13 hours to about 35 minutes.

The slash

The first version of that split copy was wrong. It used rsync ./[0-3]*/ $B/, and the trailing slash on the source tells rsync to copy each directory's contents rather than the directory itself. So 16,384 chunk directories were being emptied into one flat folder. Claude listed the target about a minute after launch, saw the shape was wrong, and stopped it at around 6,000 files. The bad copy was renamed aside as ebs-data2.flattened-bad on each disk and the copies restarted without the slash, while the original sat untouched on the system disk.

That one went into my mistakes log with a plain rule: dry-run a long copy on one directory before launching it as a background job, and read the first level of the target within seconds of starting. Checking the layout after four background units are already running is checking too late.

Proving the copy

I do not accept "rsync exited 0" as proof that 832 GB arrived intact, so the copy was checked three different ways. File count: 3,348,858 on both sides. Byte count: 878,998,507,904 on both sides. A sample of 300 random files hashed with sha256 on each side: zero mismatches. Then a full checksum dry run of every file, original against copy, which found five differences, all of them the server's own live index and state files that change whenever it runs.

One of those checks lied the first time. The sampling script tried to cd into a directory it had no permission to read, the cd failed, and the script printed "mismatches: 0" having compared nothing. Claude caught it from the output, said that result did not count, and reran it as root. A zero that came from a check that never ran looks exactly like a zero from a check that passed. I have been bitten by that shape enough times now that I read every clean result asking whether it could have been produced by nothing happening.

With the copy proven, the server was repointed at /mnt/array/ebs-data3 and started, and its log came up clean. I pressed Run Now on the ms01 backup job, the same call the Backups screen makes, to get a real backup landing on the new location.

Every snapshot failed verify

While ms01's backup ran, Claude built the backup server's own verify tool and ran it read-only against the data. It failed on every one of the 38 snapshots, each at the point of reading its index file.

The first fear is that the move broke something. So the same verify ran against the untouched original on the system disk, and it produced identical errors, so the copy was faithful and whatever was wrong had been wrong before anything moved.

The cause turned out to be a format mismatch between my two products. An Eight.ly OS box uploads its .didx index files as bare 40-byte entries with no header. The backup server only understood the headered layout. When it read the first eight bytes of one of our files looking for its magic number, what it actually found was the end offset of the first chunk entry, 0400040000000000, and since that matched nothing it knew, it gave up on the file.

Verify failing on every snapshot is loud and alarming, and on its own it would have been bad enough. The part that explained my disk was garbage collection. The server's cleanup reads every index to learn which chunks are still in use before it deletes anything. When it hit an index it could not read, it stopped before deleting a single chunk. That was the safe choice, since deleting chunks without knowing what references them is how you destroy backups. It also meant this server had never freed a byte since boxes started using it. Every prune a box requested was recorded and then quietly went nowhere.

The fix, and the real data

The fix is PR #95 under EOS-2453. The index reader now accepts both layouts, and a truncated index is still an error that stops cleanup, so the safety property survives. To check the new test actually guards something, Claude pointed garbage collection back at the old headered-only reader, and the test failed, then passed again once the fix was back.

The proof I cared about was the real data. Running the fixed verify against the 880 GB on the array: 38 snapshots, 2,038,174 chunks, 0 missing, 0 corrupt. My backups had been fine the whole time. The tool that was supposed to tell me so could not read them.

The security scan on that PR also failed, on six reachable standard-library CVEs in Go 1.26.5. That became EOS-2454 and PR #96, a one-line move to Go 1.26.6, merged first so #95 could go green behind it.

By the end of the night, ms01's 133 GiB app-data backup had landed on the relocated server, and the R730xd started a parity sync over the moved data, its first since 19 September. The next morning the 832 GB original was removed through Docker, and the system disk went from 100 percent to 5 percent, with 831 GB free.

The release that carries #95 to the box is a story of its own, and a less flattering one.