teeks99
teeks99

Reputation: 3632

Docker images across multiple disks

I'm getting going with Docker, and I've found that I can put the main image repository on a different disk (symlink /var/lib/docker to some other location).

However, now I'd like to see if there is a way to split that across multiple disks.

Specifically, I have an old SSD that is blazingly fast to read from, but doesn't have too many writes left until it kicks the can. It would be awesome if I could store the immutable images on here, then have my writeable images on some other location that can handle the writes.

Is this something that is possible? How do you split up the repository?

Upvotes: 3

Views: 785

Answers (1)

EricM
EricM

Reputation: 462

Maybe you could do this using the AUFS driver and some trickery such as moving layers to the SSD after initially creating them and pointing symlinks at them - I'm not sure, I never had a proper look at how that storage driver worked.

With devicemapper thinp, btrfs and OverlayFS this isnt possible AFAICT:

  • The Docker dm-thinp and btrfs drivers both build layers one on top of the other using block device snapshot mechanisms. Your best bet here would be to include the SSD in the storage pool and rely on some ability to migrate the r/o snapshots to a specific block device that is part of the pool. Doubt this exists though.
  • The OverlayFS driver stacks layers by hard-linking files in independent directory structures. Hard-links only work within a filesystem.

Upvotes: 1

Related Questions