I have very little experience with linux, so maybe this is a dumb question :)

I run Ubuntu 24.04 on a machine, and I had an old HDD in a usb-case which I mounted using fstab. Worked fine, but I decided it wasn’t appropriate for my purpose and removed it (physically and from fstab).

But it still shows up in the file manager? What am I missing?

  • abominable_panda@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    4 months ago

    Are you saying the drive still shows up on the side as ejectable? Or the mount directory is still there?

    If the latter what directory is it mounted to? May just be as simple as deleting that directory if its empty. (Assuming its like /media/xxx/ or /mnt/yyy/)

    Check with lsblk command if anything is in those directories

    • EvilCartyen@feddit.dkOP
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      4 months ago

      It’s mounted to /srv which is not empty, and I can also still browse some of the folders on the removed drive, which is also confusing :) I don’t understand how that’s even possible.

      Edit: It does not show up as a drive, but the mount directory is still there with a folder structure and a single file.

      Edit2: I deleted the folder which seems to have done the trick. Still confused about how and why it was still accessible…

      • NeoNachtwaechter@lemmy.world
        link
        fedilink
        arrow-up
        13
        ·
        edit-2
        4 months ago

        It’s mounted to /srv

        I suspect that your /srv had already existed before you mounted that drive for the very first time, and there were even some files in /srv.

        The mounting of the drive has made these “old” /srv files invisible. But it has not deleted them. Now you unmounted the drive, and they have come back like Zombies :)

      • rand_alpha19@moist.catsweat.com
        link
        fedilink
        arrow-up
        7
        ·
        4 months ago

        When you mount something into a directory that already exists, the drive mount replaces the original contents. When the drive is unmounted, the original contents are restored.

      • communism@lemmy.ml
        link
        fedilink
        arrow-up
        6
        ·
        4 months ago

        Does lsblk say it was mounted to /srv? If the drive doesn’t show up in lsblk that means that /srv is non-empty and those files exist on whatever drive your root directory is on