Page 1 of 1

USB drive

Posted: Mon Apr 08, 2013 8:26 pm
by Alan Johnstone
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?

Re: USB drive

Posted: Wed Apr 10, 2013 8:41 am
by SirLagz
Do you unmount the drive before you unplug it ?
Unmounting and remounting should fix the issue.

Re: USB drive

Posted: Wed Apr 10, 2013 9:09 am
by Alan Johnstone
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

Re: USB drive

Posted: Wed Apr 10, 2013 10:02 am
by rpdom
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.

Re: USB drive

Posted: Wed Apr 10, 2013 10:48 am
by Alan Johnstone
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 ?