1

I am on Ubuntu 20.04 Desktop and I have an external drive that is a "workhorse" for a lot of my backup routines.

Problem:
For whatever reasons unbeknownst to me.. following a recent reboot, it now mounts the same external drive under two names, which is causing my scripts and apps to fail b/c they can find the correct path. For example:

The path to my external should be:

/media/user/external (and indeed in nautilus, I see it mounted as normal as "external")

Where things get weird is when I run Nautilus with admin privileges and I see that the external drive has also been mounted at:

/media/user/**external1** (the "1" is being appended to the external drives name and wreaking havoc on backup routines.

In a nutshell, any script or running as root will see an incorrect path to my external drive and fail.

I didn't manually created any mount points... this has been working normal as expected for years, this stopped... 😲😲

Question:
How can I ensure the drive is only mounted correctly, once?

Any tips?

10
  • To be clear regular user sees one name a different name is used when you use sudo?
    – David
    Oct 31, 2022 at 15:45
  • yes, that is correct
    – nightwatch
    Oct 31, 2022 at 15:50
  • any script running as the root user sees the incorrect path to the external drive
    – nightwatch
    Oct 31, 2022 at 15:52
  • 1
    Did you create the mount point? The default and I just verified on one of my machines is /media/username/name of the drive. So in my case the path is /media/david/Elements. If I plug in a second drive same name on the device it is auto called Elements1 .Your system is seeing external is in use and using external1 . Sorry I do not know how that can be changed.
    – David
    Oct 31, 2022 at 15:57
  • 2
    Unfortunately, I saw this too late... I solved it... but I have seen this problem before.. (a "ghost mount" is the only I can describe it. I unmounted the drive in nautilus as regular user and root. However under /media/user there remained a directory called "external". I deleted it and rebooted... problem solved
    – nightwatch
    Nov 2, 2022 at 5:21

1 Answer 1

1

The solution to this is straightforward.

  1. As the regular open nautilus and properly unmount the drive.

  2. As root user open another nautilus window and correctly unmount the drive.

  3. then, via terminal $cd /media/user/ and execute ls (if you still see your external mount listed, that is what I can only call a "ghost mount", delete it, then reboot... you are back in action)

Not the answer you're looking for? Browse other questions tagged .