this post was submitted on 24 Mar 2025
32 points (97.1% liked)

Selfhosted

60281 readers
684 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

I'm hosting a few services using docker. For something like an openstreetmap tileserver, I'd like it to remain on my SSD because high speed improves performance, and the directory is unlikely to grow and fill the drive.

For other services like NextCloud, speed isn't as important as storage size, so I might want it on a larger HDD raid.

I know it's trivial to move the volumes directory to wherever, but can I move some volumes to one directory and some volumes to another?

you are viewing a single comment's thread
view the rest of the comments
[–] ikidd@lemmy.world 4 points 1 year ago (1 children)

Is there any advantage to bind mounting that way? I've only ever done it by specifying the path directly in the container, usually ./data:data or some such. Never had a problem with it.

[–] mhzawadi@lemmy.horwood.cloud 3 points 1 year ago (1 children)
[–] ikidd@lemmy.world 3 points 1 year ago (1 children)

Well, I know you can define volumes for other filesystem drivers, but with bind mounts, you don't need to define the bind mount as you do, you can just specify the path directly in the container volumes and it will bind mount it. I was just wondering if there was any actual benefit to defining the volume manually over the simple way.

[–] mhzawadi@lemmy.horwood.cloud 5 points 1 year ago (1 children)

In my case I need to use a named volume for docker swarm, also I can reuse a named volume in other services. If your not using swarm then just a bind mount should be fine

[–] ikidd@lemmy.world 1 points 1 year ago

OK, yah, that's good point about swarms. I've generally not used any swarmed filesystem stuff where I needed persistence, just shared databases, so it hasn't come up.