Does mv on a FAT filesystem actually rename or does it copy and delete?

Ralf Mardorf silver.bullet at zoho.com
Sat Feb 3 17:21:55 UTC 2018


On Sat, 3 Feb 2018 18:14:11 +0100, Ralf Mardorf wrote:
>On Sat, 03 Feb 2018 11:30:28 -0500, Paul Smith wrote:
>>That doesn't answer the question.  
>
>The question already was mostly answered, by underpinning it with an
>strace output, just not on a VFAT, because not that many subscribers
>might use this file system.
>
>>it's going to rely on the published kernel interface to move a file,
>>e.g. invoke the rename(2) system call.
>>
>>However, that doesn't mean that the actual behavior of that system
>>call is the same on a VFAT filesystem  
>
>Indeed, strace might fool us. Fair enough, that's one reason why I
>mentioned Google.
>
>I wonder why it could be much important that the rename operation on
>VFAT is or isn't atomic, when renaming files or dirs on the same
>partition. First coping and then removing does have at least two
>pitfall, since an accident could lead to duplicated files and
>temporarily requires double the free diskspace, but this actually isn't
>catastrophic.

PS: Maybe a power outage in the middle of an atomic rename could cause
data loss. While "atomic" quasi is for done or not done, there
might be situations where even an atomic operation could be half-done.
Taking a look at a seemingly perfect circle under a scanning tunneling
microscope, it isn't a circle anymor at all.





More information about the ubuntu-users mailing list