I have a Thinkpad mini that needs to expand it’s disagree storage and have a couple of Red 4Tb with basically no use.

I wanted to plug one of them over USB, but it seems that docker just doesn’t like to have volumes on external drives. AFAIK docker starts before the drive is fully mounted, preventing it from doing so. I couldn’t find any reliable way to work around this (but I’m open to suggestions!).

I was wondering if it makes sense too just get an extension SATA cable, if they even exist, and have the drive outside the case. One of the worries I have is if it will have enough power (being meant for 2.5 drives originally).

The alternative would be to either change the server itself or to buy a larger 2.5 instead to keep up for a while.

  • MYWNcWR9Rgc31zkhTOsA [they/them, she/her]@hexbear.net
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    10 months ago

    Assuming Linux with SystemD,

    sudo systemctl edit docker
    [Unit]
    RequiresMountsFor=/path/to/external/volume
    

    You can use a SATA caddy with its own power supply if your basic USB adaptor isn’t able to draw enough.

    • Railcar8095OP
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      10 months ago

      Haven’t seen this option before, will try today!

      Thanks!

  • PriorProject@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    10 months ago

    I wanted to plug one of them over USB, but it seems that docker just doesn’t like to have volumes on external drives. AFAIK docker starts before the drive is fully mounted, preventing it from doing so. I couldn’t find any reliable way to work around this (but I’m open to suggestions!).

    You haven’t said what operating-system you’re using, how your mount was configured, or how you’re starting docker or your containers. An external drive is the normal way to do this, though, and I do it on Linux with ZFS drives and docker-compose auto-starting the containers and it works fine.