I have now backed up my contents and am able to try this out.
The popup indeed makes it clear that data will be lost.
Process
If, like me, you don't believe the system that your card is broken, you can try running fsck
like @alecxs advised me to. Use the -y
flag to avoid manually confirming every fix.
I used mount
/blkid
to see what filesystemtype my SDcard uses and what its block device id is. And then I ran fsck.exfat /dev/block/mmcblk0p1
which told me
1|beryllium:/ # fsck.exfat -V /dev/block/mmcblk0p1
exfatfsck 1.2.2
Copyright (C) 2011-2015 Andrew Nayenko
beryllium:/ # fsck.exfat /dev/block/mmcblk0p1
exfatfsck 1.2.2
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
WARN: volume was not unmounted cleanly.
Checking file system on /dev/block/mmcblk0p1.
File system version
1.0
Sector size
512 bytes
Cluster size
128 KB
Volume size
463 GB
Used space
211 GB
Available space
252 GB
ERROR: unknown entry type 0x89.
ERROR: unexpected continuation (0).
Totally 5536 directories and 64646 files.
File system checking finished. ERRORS FOUND: 2.
whoops, I should have unmounted it first!!
Running it again (this time from boot instead of recovery (shouldn't matter), and not mounted) I get the option to actually fix it. Note that I did this as su
:
beryllium:/ # fsck.exfat /dev/block/mmcblk0p1
exfatfsck 1.3.0
Checking file system on /dev/block/mmcblk0p1.
File system version
1.0
Sector size
512 bytes
Cluster size
128 KB
Volume size
463 GB
Used space
211 GB
Available space
252 GB
ERROR: unknown entry type 0xc0.
Fix (Y/N)? Y
ERROR: unknown entry type 0xc1.
Fix (Y/N)? Y
ERROR: unknown entry type 0xc1.
Fix (Y/N)? Y
Totally 5537 directories and 64860 files.
File system checking finished. ERRORS FOUND: 3, FIXED: 3.
reboot
The reboot was fairly quick, the login afterwards took a bit of time, and now... the sd card warning is gone! This also answers a question I was already typing but haven't submitted yet: How to fix the SD card without data loss!
I shall publish that question as well soon, so that it's easier to find this solution.