4

I am copying 486 items, totalling 2.9 GB, from a folder on my desktop, to a microSD 16 GB card via a USB card reader. The tranfer completes fine. I then do a safely remove (have also tried eject and unmount), but never do all the files copy, even though the transfer completes without error.

When I plug the card back in and view the contents, the main directory structure is there, but the folders inside are empty (no files). Why?

I have tried different microSD cards.

Its like Ubuntu is copying the files into my RAM instead (I'm guessing), or some other cache, and even though I do a safe removal, the files I've copied are not all there. The majority of files in sub-folders are missing.

Running Ubuntu 11.04 updated.

Jorge Castro
  • 71,754
nLinked
  • 3,347

1 Answers1

2

A SD is slower than a regular USB flash drive. After pressing "Eject" or "Unmount", make sure that buffers are written before the drive is removed.

To be sure that the buffers are flushed before you remove the drive, open a terminal and run:

sudo umount /media/YourSdCard

After the program is done and returned to the prompt, you can safely remove it. Alternatively, run sync and wait until it's completed. After that, use "Eject" or "Unmount" and remove the SD card.

Lekensteyn
  • 174,277