Alan Johnstone
Posts: 45
Joined: Tue Jan 08, 2013 4:35 pm

USB drive

Mon Apr 08, 2013 8:26 pm

I have a USB drive working that has revolutionised how I can transfer files between my Pi
and the outside world - in both directions.
One fly in the ointment is that although I can hot plug/unplug it (ie the new drive is detected)
the image of what is on the drive is not updated.
What I mean by that is :
Suppose there was fileA on the drive.
I unplug and on my other computer I remove fileA and copy ontothe drive fileB.
Then when I put the drive back into the RPi fileA seems to still be there
and fileB is not.
Attempting to open fileA gives an empty file.

Rebooting solves everything but is there a way to get the RPi to reread the drive?

Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: USB drive

Wed Apr 10, 2013 8:41 am

Do you unmount the drive before you unplug it ?
Unmounting and remounting should fix the issue.
My Blog -
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post !

Alan Johnstone
Posts: 45
Joined: Tue Jan 08, 2013 4:35 pm

Re: USB drive

Wed Apr 10, 2013 9:09 am

No, I am not.

It seems to mount by itself the first time I plug the USB stick in.
ie the RPi is running without the USB stck attached and I hot plug the stick in then
I get a message on the desktop saying removeable media is inserted
I can read it OK.
In File Manager right clicking the drive gives
Mount Volume - which is greyed out
Eject Removeable Media - which when click gives an error saying filed to execute
child process 'eject'

When I unplug there is no message.

If I then make some changes to the stick's content eg add a file,
when I replug it in I get the same message but the new file is not seen
ie it has not reread the file system.
I get the same result right clicking the drive in File Manager

User avatar
Posts: 17180
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: USB drive

Wed Apr 10, 2013 10:02 am

Alan Johnstone wrote:filed to execute
child process 'eject'
(I assume you mean "failed" - my typing is not perfect either ;-) )

It looks like the "eject" command is not available.

Try typing "ls /usr/bin/eject" (without the quotes) in a terminal session like lxterminal.

If it returns "ls: cannot access /usr/bin/eject: No such file or directory", then the eject function is not installed. Next step is to install it. First "sudo apt-get update", then "sudo apt-get install eject". Now try your "Eject Removeable Media" option.

Alan Johnstone
Posts: 45
Joined: Tue Jan 08, 2013 4:35 pm

Re: USB drive

Wed Apr 10, 2013 10:48 am

That worked as far as the eject command now "works" in that the drive dissappears from File Manager.

However I get the same behaviour when I replug the stick. The old file system image
is there but the new added file is not.

Ther Mount Volume is greyed out so I cannot use that.

Am I missing the "mount volume" program ?

Return to “HATs and other add-ons”