I have an external HDD (15 TB) that I use as a backup storage. Usually I perform the command
rsync -aluv /mylocalfolder /mytargetfolder
to save my data. But this time Linux sets the file system to “read-only” during the rsync process.
Output from dmesg is:
[ 2247.831348] exFAT-fs (sdc2): error, found bogus dentry(64528) beyond unused empty group(64526) (start_clu : 37895, cur_clu : 173924)
[ 2247.831351] exFAT-fs (sdc2): Filesystem has been set read-only
Then I tried to fix the file system error with (sdc2 refers to the drive with corrupted file system):
sudo fsck.exfat -p /dev/sdc2
However, the answer I received was:
exfatprogs version : 1.1.0
failed to get stream dentry. 0
/dev/sdc2: checking stopped. directories 11500, files 676064
/dev/sdc2: files corrupted 1, files fixed 0
So I have no idea how to proceed. I want to avoid setting up the whole file system again, because it would take days to copy all the data to the HDD again.
More information about my system:
Linux: 5.10.0-21-amd64
fsck: fsck from util-linux 2.36.1
Any advice on how to fix this error and avoid it in the future is appreciated. Many thanks in advance.