[Bug 268005] rsync to FAT32 flash drive gets "Freeing unused sector" errors

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 18 Apr 2023 14:52:13 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268005

--- Comment #3 from wbe@psr.com ---
OK, reporting a problem is certainly better than ignoring it, and that explains
why it appeared in 13.1, but that leaves the question of why it's happening at
all and fixing that.

As a user, what I see is that rsync to an msdosfs flash drive has appeared to
work for years (FreeBSD 9 - 13.0), even repeatedly to the same drive, mixed
with mounting it on a Windows machine and adding and deleting files there with
no problems evident, so if there was corruption, it didn't cause any apparent
problem.  Yes, that's not proof.  :)  Now that the issue has been turned into
an error, I get "remounting read-only due to corruption" when the error occurs
and the rsync fails rather dramatically.

If corruption really has been happening for years, maybe I've just been lucky.

When this problem arose, I wrote a script that does "find -newer" and "cp -p"
to the flash drive: that doesn't trigger this problem, even now.  rsync to a
freshly formatted drive (almost all writes) generally works, too.  It's rsync
when only some files out of many have changed that pretty consistently dies.

I've only seen this with MSDOSFS flash drives.  The same size and type of flash
drive with UFS works fine.  I have no data regarding non-flash MSDOSFS drives.

While I've been using Win10 for repairs, I could try fsck(_msdosfs) if that
would be more informative and helpful.
 -WBE

-- 
You are receiving this mail because:
You are the assignee for the bug.