Elektrine lite

← Feed

@IceWolf@masto.brightfur.net

Post #1555929

2026-03-12 01:25 UTC

@keirFox Yikes. That sounds like your disk dying. This is a "get a new disk and copy everything over NOW" situation. There are filesystems that can detect this sort of corruption. btrfs might be a good choice. It keeps checksums of all files, and there's a "btrfs scrub" command that can do this. So yeah, you can format the new disk btrfs instead of ext4 and it should protect you from this. It won't automatically repair, not unless you tell it to keep two copies of everything (which you can do! but then you only get half the disk space), but you can pull the good copies from your backups. That won't help for anything that's already corrupted, of course. Hopefully your backups can help with that... I bet you could, _after_ copying everything, on the new disk, search for files that have lots of NULs in them. I bet grep can. If they're _completely_ zeroed out it might be easier. But yeah first order of business is to get a replacement disk. Sorry about the cost.

Replies (2)

  • @IceWolf@masto.brightfur.net 2026-03-12 01:31

    @keirFox Sweet, grep to the rescue: grep -RPla '\0{100}' /wherever this looks for 100 null bytes in a row. (-RPla = recursive, PCRE regex, only print filenames instead of printing matching lines, also search binary files.) If you want only things that are entirely null, I bet I could whip up a perl script or something.

    Open ##1555930

  • @barnibu@birdbutt.com 2026-03-12 02:52

    @IceWolf @keirFox I've used btrfs on a whacky disk before and while scrub never found corruption, it became several time just straight unmountable with no option to repair, other than salvage most data with emergency tools and then reformat. I've lost faith in btrfs, using zfs now.

    Open ##1555932