Data copy to USB fails.

You think you have found a bug? Let us know about it.
Post Reply
protocoder
Posts: 12
Joined: 1. May 2012, 06:01

Data copy to USB fails.

Post by protocoder »

Reporting bug in copying files or images to USB flash disk.

Environment:

Salix Lxde installed from Live Disk.
Test Object: USB TS128MJFLASHA USB device.

Test 1: copy a image, I tried to copy gparted.jpeg to USB from Salix Lxde both a. Linux drive and b. NTFS windows partition drive from My documents and using terminal. (configured to assess the windows drive from Salix).

Result: The copy appears successful. Remove the USB and Insert back and notice that data isn't there. Copied correctly is false confirmation until USB is put back.. It got me crazy for a while.

Test 2: Tried Test 1 with data. Copied a folder and repeated Test 1 with same failure.
At this moment, not sure if it happens with just me.

Thanks
Anand
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: Data copy to USB fails.

Post by JRD »

Di you unmount it before removing your USB key ?
Image
protocoder
Posts: 12
Joined: 1. May 2012, 06:01

Re: Data copy to USB fails.

Post by protocoder »

Aha .. you caught me right. I apologize. This is new to me. I am confused, I don't remember unmounting the usb in Ubuntu. So is my understand right, there is no need to mount any devices but need to unmount them.
Thank you very much.
Anand
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Data copy to USB fails.

Post by Shador »

Actually you do mount them. But file managers usually either mount them as soon as the device is plugged in (e.g. Windows) or they mount the device implicitly when you first try to open it. So you might not always notice it. Thunar for exmple indicates the mount status by changing the devices color/transperency.
Image
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: Data copy to USB fails.

Post by thenktor »

protocoder wrote:I am confused, I don't remember unmounting the usb in Ubuntu.
You have to unmount your USB disks everywhere if you want your data to be written safely. Also in Ubuntu or Windows.
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
protocoder
Posts: 12
Joined: 1. May 2012, 06:01

Re: Data copy to USB fails.

Post by protocoder »

Thank you Shador and thenktor,
In theory yes we need to safely remove USB, 80% time when I tried to safely remove, it says busy or some stuff. over many years I just managed to just pull it out ( talking windows). I will double check with Ubuntu again when I find time. A more linux question. So If I want to mount drive, a camera to suck in pictures etc every time do I have to do dmesg etc to find and make mount with that device, oh yeah first creating a directory as su. Is there a easier way. Any configuration in /fstab or whatever directories. Please can you enlighten me on that please. Cheers
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Data copy to USB fails.

Post by Shador »

protocoder wrote:A more linux question. So If I want to mount drive, a camera to suck in pictures etc every time do I have to do dmesg etc to find and make mount with that device, oh yeah first creating a directory as su. Is there a easier way. Any configuration in /fstab or whatever directories. Please can you enlighten me on that please
You don't need to do that. Common linux file managers handle all of this implicitly, i.e. creation of a directory in /media, mounting and unmounting implictly and/or through a easy-to use GUI interface.
protocoder wrote:In theory yes we need to safely remove USB, 80% time when I tried to safely remove, it says busy or some stuff.
It says this because the data is not yet written to the stick. If you pull it out regardless you will at least loose part of the data. Ever seen those pictures which lack the bottom half or some color channel in that half? That's caused by pulling out a USB stick to early.
If that message appears just wait until your file manager indicates the device as unmounted. For Thunar the device is made transparent in the left pane as long as it is unmounted.
Image
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: Data copy to USB fails.

Post by thenktor »

Shador wrote:It says this because the data is not yet written to the stick.
Same message appears if some app has files on the USB stick opened for reading ;)
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
Post Reply