file move causes data loss if interrupted due to system crash

Asked by kyferez

Version: 8.04 with all updates applied

1) Cut a few GB worth of files from PC somewhere like the desktop or Documents
2) Paste files to an NTFS formatted USB drive
3) Make Linux crash (in my case it's a full-freeze - the mouse won't move or anything) and you have to do a hard reset.
4) Reboot. The files that had completed moving to the USB drive are gone, those that hadn't copied are still on the source drive.

What should have happened: The "completed" files from the large move should have been on the destination drive despite the system lockup.

What actually happened: The files on the destination drive were written but apparently they were not entered into the NTFS table. Running chkdsk in windows recovered the files as "found" files and as "recovered file fragments".

This is enough to make me refuse to use Ubuntu until fixed. I've never had such file loss in Windows, and it's not acceptable that a "more stable & more secure" OS would fail in such an area - ever!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Florian Diesch (diesch) said :
#1

Thank you for taking the time to report this issue and helping to make Ubuntu better.

Ubuntu is using a write cache for accessing disks. That means that data isn't written instantly but writing is delayed. The advantage of this is that applications don't have to wait for data being written and different write actions can be grouped together. That greatly improves write performance and responsiveness of applications. However one drawback is that the file system may be corrupted or inconsistent if the writing process is interrupted, e.g. be removing an external drive or by a system freeze.

Note that because Microsoft didn't release the NTFS specifications Linux still has some issues regarding NTFS. Therefor it may be preferable to use other file systems when working with Linux.

As this issue isn't a bug but the expected (but admittedly not ideal) behavior I convert this bug report into a question.

Revision history for this message
kyferez (kyferez) said :
#2

I made this reply on the bug report converted to a question, but to make sure it's seen, I'm copying it here:
If this is the expected behavior, then that signifies a poor design ideology. To significantly compromise data integrity for the sole sake of speed is entirely unacceptable for anyone attempting to use such a machine for anything other than play. It relegates Ubuntu to the realm of "toy"!

Unless there is a way to easily disable or remedy this "expected behavior" you can not expect me to use or recommend ubuntu to anyone-ever.

Revision history for this message
kyferez (kyferez) said :
#3
Revision history for this message
Florian Diesch (diesch) said :
#4

You can disable the write cache by using the 'sync' mount option. But according to the manpage of mount this is not supported for NTFS.

As said above don't use NTFS on Linux if you need a reliable file system.

Can you help with this problem?

Provide an answer of your own, or ask kyferez for more information if necessary.

To post a message you must log in.