0

I use a USB stick (labeled rbp4Backup) for quite some time to keep backups via image-utils. The stick used to be auto-mounted when connected and then show up as /media/pi/rbp4Backup.

Now I get the following WITHOUT the stick even connected:

pi@rbp2:~ $ ls /media
ls: cannot access '/media/rbp4Backup': No such file or directory
total 0
d????????? ? ? ? ?            ? rbp4Backup

Connecting the stick does not make any difference to this - nor does the stick show up in /media. The stick itself is ok as tested on a Mac.

Any hint how to get this sorted?

UPDATE: I tried all of the suggested, no effect:

pi@rbp2:~ $ sudo fusermount -u /media/rdp4Backup
fusermount: failed to unmount /media/rdp4Backup: No such file or directory
pi@rbp2:~ $ sudo rm -rf /media/rbp4Backup
rm: cannot remove '/media/rbp4Backup': Permission denied
pi@rbp2:~ $ sudo rm /media/rbp4Backup
rm: cannot remove '/media/rbp4Backup': Is a directory
pi@rbp2:~ $ sudo rmdir /media/rbp4Backup
rmdir: failed to remove '/media/rbp4Backup': Permission denied
pi@rbp2:~ $ ll /media
ls: cannot access '/media/rbp4Backup': No such file or directory
total 0
d????????? ? ? ? ?            ? rbp4Backup
tbue
  • 3
  • 2

3 Answers3

1

This can happen when certain kinds of mounts get screwed up, eg., if it is over a network which is suddenly disconnected, or a device suddenly unplugged.

First try:

fusermount -u /media/rdp4Backup

If that doesn't work, try just removing the mount point then creating it again:

# Could also try `rmmdir`, but I think in its current state
# won't count as such.
sudo rm /media/rdp4Backup
sudo mkdir /media/rdp4Backup

Once either of those two are done and the directory is what it is supposed to be again, you should be able to mount the stick.

goldilocks
  • 58,859
  • 17
  • 112
  • 227
1

As stated in Goldilocks' comment, it happens due to screwed mounts (points) (e.g. when you remove the PI's supply without turning it off). It happens to my company's product once in a while. What I have to do is remove rm -rf (as seen here https://www.javatpoint.com/linux-rm-rf ) the offending folder manually.

Clóvis Fritzen
  • 373
  • 1
  • 11
0

One of the first steps when I image a new OS is turn off the annoying automount "feature" which is part of File Manager.

This is notorious for creating multiple mount points (there are dozens of questions about this on this site).

I create a fstab entry to mount drives (usually in /mnt where they should be).
Usually I manually mount but you can have drives automatically mounted.


I don't actually mount my backups on the Pi.
I use a directory on my Mac which I mount using Samba to backup all my Pi.

Milliways
  • 59,890
  • 31
  • 101
  • 209