User avatar
aladins
Posts: 5
Joined: Tue May 03, 2016 1:10 am

RPi-Windows File Transfer via USB Stick

Tue May 03, 2016 1:17 am

Hi everyone,

I have my RPi configured as a headless torrent box, all the torrenting (active & completed torrents) is happening on a 128GB USB stick (mounted as sda1, NTFS).

My idea was to torrent for a while, then turn off the RPi, unmount/remove the USB stick, plug it in my Windows PC to move the completed torrents. (since copying over the network is just too slow for my purposes)

However, I have a problem when I plug the USB stick in my Windows PC, I get the "drive needs to be formatted before it can be used" message, so I can't access the files.
I return the USB stick to the RPi and re-mount it, everything works just fine, my torrens resume without a problem.

What can I do to be able to access the USB stick on a Windows PC?

tweak42
Posts: 540
Joined: Tue Mar 22, 2016 3:16 am
Location: Los Angeles, California

Re: RPi-Windows File Transfer via USB Stick

Tue May 03, 2016 2:31 am

Are you sure the format is NTFS? What does the Windows Disk Management tool show? Does the usb flash drive contain only 1 partition? Did the flash drive previously detect in Windows and it just suddenly stopped being recognized? Which system formated the flash drive last (windows or Pi)? Have you tried a different usb port?

Link to a few a suggestions, though don't format unless you want to loose all your data.
http://www.makeuseof.com/tag/external-d ... n-windows/

User avatar
aladins
Posts: 5
Joined: Tue May 03, 2016 1:10 am

Re: RPi-Windows File Transfer via USB Stick

Tue May 03, 2016 3:36 am

Yes, the format is NTFS.
The USB stick has one partition.
The USB stick was detected successfully in Windows before I used it in the RPi.
The stick was formatted in Windows (as NTFS).
I tried multiple USB ports, and even a different computer.

darkbibble
Posts: 623
Joined: Mon Mar 09, 2015 5:20 pm
Location: corby, england

Re: RPi-Windows File Transfer via USB Stick

Tue May 03, 2016 12:50 pm

whenever I plug my memory stick into my windows machine after writing files on pi, it always gives me an error messege but the drive is still accessible from windows file manager
Q; How many Windows users does it take to fix a Linux problem??
A; Whats a Linux problem

beta-tester
Posts: 1412
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: RPi-Windows File Transfer via USB Stick

Tue May 03, 2016 4:21 pm

darkbibble wrote:whenever I plug my memory stick into my windows machine after writing files on pi, it always gives me an error messege but the drive is still accessible from windows file manager
on your RPi site, did you unmount the USB stick properly...?
e.g.:

Code: Select all

sudo umount /dev/sda
did you "eject" the USB stick properly...?
e.g.:

Code: Select all

sudo eject /dev/sda
(as long as i know, eject implicitly unmounts the device, so eject should be enough)

(where /dev/sda your USB stick is)
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

darkbibble
Posts: 623
Joined: Mon Mar 09, 2015 5:20 pm
Location: corby, england

Re: RPi-Windows File Transfer via USB Stick

Tue May 03, 2016 5:33 pm

to eject/unmount drives on raspbian i use the eject icon in the right corner of desktop
Q; How many Windows users does it take to fix a Linux problem??
A; Whats a Linux problem

beta-tester
Posts: 1412
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: RPi-Windows File Transfer via USB Stick

Tue May 03, 2016 6:42 pm

i think the eject icon should do the job...
strange, that you have that issue...

PS.: do you get a messag that you can unplug the USB device or something similar...?
i don't used that eject icon on RPi, but on my PC (Ubuntu) you get a message.
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

pksato
Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: RPi-Windows File Transfer via USB Stick

Tue May 03, 2016 7:55 pm

Hi,
Linux writing to NTFS is not recommended.
Even using NTFS-3G , file system become "unclear".
In this case, when plug on windows, It ask to run check disk.
On raspberry pi, before mount, open a terminal and run.
sudo ntfsfix /dev/sda1
If not have a critical error report, remove and plug on windows.
Before unplug, just to check.
sudo fdisk -l /dev/sda
Partition type/Id is 7 (HPFS/NTFS)?
If not, change it.
sudo fdisk /dev/sda
And press this sequence: t,7, w

If windows still asking to format, ignore, go to disk manager and check if windows recognize partition as NTFS.
Last solution, backup and format.

I recommend to use ext3/ext4 for this situation. Yes, windows can access ext3/ext4, after install proper drivers.
http://www.ext2fsd.com/
Stand alone ext3/ext4 access software (not need to install, no drive letter)
http://www.diskinternals.com/linux-reader/
http://sourceforge.net/projects/ext2read/

tweak42
Posts: 540
Joined: Tue Mar 22, 2016 3:16 am
Location: Los Angeles, California

Re: RPi-Windows File Transfer via USB Stick

Tue May 03, 2016 8:56 pm

pksato wrote:Hi,
Linux writing to NTFS is not recommended.
Even using NTFS-3G , file system become "unclear".

I recommend to use ext3/ext4 for this situation. Yes, windows can access ext3/ext4, after install proper drivers.
http://www.ext2fsd.com/
Stand alone ext3/ext4 access software (not need to install, no drive letter)
http://www.diskinternals.com/linux-reader/
http://sourceforge.net/projects/ext2read/
pksato,
How reliable is linux writing with exfat vs ntfs? Perhaps exfat would be more convenient than ext3/4?

User avatar
aladins
Posts: 5
Joined: Tue May 03, 2016 1:10 am

Re: RPi-Windows File Transfer via USB Stick

Fri May 06, 2016 11:22 am

Thanks guys for all the feedback, turns out RPi (Linux) really doesn't play nice with NTFS, so I'm now testing with exFat.

As for the files that were on the USB stick, I managed to get them out by plugging the USB stick to my Linux laptop, read the files without a problem so I copied them from there and all is good.

java
Posts: 226
Joined: Mon Jul 21, 2014 9:41 am

Re: RPi-Windows File Transfer via USB Stick

Fri May 06, 2016 12:08 pm

I do pretty much as you have described in your original post - except, I mount my USB [ 32 Gigabytes ], as a Samba share, copy files of via network.

User avatar
aladins
Posts: 5
Joined: Tue May 03, 2016 1:10 am

Re: RPi-Windows File Transfer via USB Stick

Sun May 08, 2016 5:57 pm

java wrote:I do pretty much as you have described in your original post - except, I mount my USB [ 32 Gigabytes ], as a Samba share, copy files of via network.
What kind of file transfer speeds are you getting?
(FYI mine is a RPi 1B)

beta-tester
Posts: 1412
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: RPi-Windows File Transfer via USB Stick

Sun May 08, 2016 6:46 pm

aladins wrote:
java wrote:I do pretty much as you have described in your original post - except, I mount my USB [ 32 Gigabytes ], as a Samba share, copy files of via network.
What kind of file transfer speeds are you getting?
(FYI mine is a RPi 1B)
i have a transfere rate of constant 8.6MByte/s, if i copy a 3Gbyte file from RPi to Windows 10
(the trnsfere rate i took from windows file browser during transfer wasn't going lower than 8.6MByte/s ... from 8.6 to 9.0MByte/s peak).

on RPi 2B:
no overclocking,
samba server,
100Mbit/s ethernet
attached 64GB UltraFit USB 3.0 stick direct to RPi's USB port, with UDF filesystem
(i use UDF for a specific test case only, for you, i would recommend ext4 as filesystem in case the stick stays at RPi)

interconnected via 1000Mbit/s switch

on Win10:
1000Mbit/s ethernet
SSD flash drive.
(on the windows site there is nothing that could decrease the transfer speed - compared to the RPi site)

filet ransfer was initiated from windows file browser (copying file from RPi to Win).
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

Return to “General discussion”