Flushing data to external storage devices

Bug #43503 reported by Adam Pond
14
Affects Status Importance Assigned to Milestone
Ubuntu
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

External USB Storage devices should be flushed immediately to avoid data loss. Most users would be happy to see a progress bar rather than have a chance that their data may not have been saved.

After dragging files from the desktop into the folder of a USB external storage device, a move operation was executed and the files appeared to have been successfully moved. Unfortunately, the buffers had not been flushed and when the device was removed, data was lost.

This issue was compacted by no obvious way of disconnecting the device from the taskbar as Windows are used to, (although I'm not suggesting that there needs to be). This may lead people to the assumption that USB storage is handled more gracefully in Ubuntu as is the case with many other things.

Further information about this can be found in the following ubuntu forum:
http://ubuntuforums.org/showthread.php?p=994249#post994249

Revision history for this message
Video Toaster (toaster) wrote :

I agree. Most people would not think to right-click the drive on the Desktop and select "Eject". People expect to be able to take their USB drive out when they like and have all their files be on the drive, as they are able to do in Windows. I belive (please correct me if I'm wrong) XP uses no drive caching by default to solve this problem. Windows 2000 displays a warning when you don't properly eject a removable device and shows you how to properly remove the device in the future.

If the drive caching problem can't be solved, making it more obvious how to unmount the Flash drive and/or displaying a warning similar to Windows 2000's when the drive is improperly removed would be good. (I'm not a developer, so I have no idea how hard any of this would be to implement)

Revision history for this message
Video Toaster (toaster) wrote :

Just read http://readlist.com/lists/vger.kernel.org/linux-kernel/22/111748.html

Since immediately writing to the drive appears to be a bad idea, is it possible to have some kind of helper screen to guide new users? A new user of (K)ubuntu is going to switch back to their good old Windows install as fast as possible if they lose data from their Flash drive - they won't know why or how to fix it.

Revision history for this message
Adam Pond (adpond) wrote :

After reading about the problems with writing to flash drives, I still believe that we can find a compromise that will assist users and make it obvious that the data has not yet been committed.

With regards to writing data, these 2 steps will greatly reduce the chance of loss of data without the need for excessive writes.
1. Write after a period of inactivity with of the drive.
2. Write after a full operation has occurred, such as adding a directory full of files, but not for each file unless that was the only operation.
3. Write before any read access (which I suspect happens already).

Combine this with obvious indicators to the user that the operations have not yet been committed, such as
1. Adding a task bar item with options to:
     a. View the list of operations pending
     b. Commit the pending operations.
     c. Unmount or disconnect.
2. Add a glyph to the files and folders in nautalis to indicate that they have not been comitted. Something similar to tortoise svn for windows would be amazing and probably easy to implement.

Obviously, a similar approach should also be adopted in Kubuntu.

Revision history for this message
towsonu2003 (towsonu2003) wrote :

which package does the writing?

Revision history for this message
trollord (trollenlord) wrote :

Feisty and up come with a notification for flushing to prevent user from removing the device too fast. In case it does not function properly in some situation, please feel free to file a bug against it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.