I’m running a Ubuntu server on my old laptop with an external HDD connected to it. The external HDD is powered independently from the laptop, as it is plugged into the wall.

During a power outage, my laptop remains operational due to its battery, but the HDD shuts down. When power is restored, my laptop does not automatically remount the HDD, and I have to reboot the system manually to access it.

Does anyone know how I can resolve this issue?

  • Lenna 🔞@piefed.caOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 hours ago

    auto-mounting system that only happens to run at boot

    This is correct. I made my drive auto mount using /etc/fstab, and I believe that is only checked once during boot.

      • Lenna 🔞@piefed.caOP
        link
        fedilink
        English
        arrow-up
        2
        ·
        4 hours ago

        If I were to make it run that command every 5 minutes, would there be any downsides?

        • tofu@lemmy.nocturnal.garden
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 hours ago

          I don’t know if it has side effects when there’s issues with mounting or the like.

          It would also interfere if you want to unmount it and forget to disable the cronjob.

    • tal@lemmy.today
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 hours ago

      Nah, that’s good. What I mean is, if it’s in /etc/fstab, it should be possible to manually mount it without a reboot. Have you tried manually remounting it after power comes back?

      • Lenna 🔞@piefed.caOP
        link
        fedilink
        English
        arrow-up
        2
        ·
        5 hours ago

        Nope, I haven’t tried that. But I will give it a try when the next power outage occurs. I actually didn’t know I could manually remount until today. I’m still pretty new to selfhosting.

        • tal@lemmy.today
          link
          fedilink
          English
          arrow-up
          2
          ·
          5 hours ago

          Gotcha. Yeah, the stuff in fstab is just a convenience; it’s equivalent to running a bunch of mount commands at boot. You might be able to just run “mount” again without the '-o remount" option. I was just listing that in case you were seeing some kind of errors in trying to manually mount it.