4 ms·
So, we're making volumes better! Please see: https://github.com/docker/docker/pull/8484 https://github.com/docker/docker/pull/8484 And that is only the beginnin
by cpuguy83 12y ago
So, we're making volumes better!
Please see: https://github.com/docker/docker/pull/8484 https://github.com/docker/docker/pull/8484
And that is only the beginning.
It may be presumptuous to say the referenced PR will be in 1.4, but that's certainly what I'm pushing for.
- vidarh 12y agoAny plans on making it possible to control what's backing those volumes more directly? For me, when I'm using data volumes, it's generally because I have specific requirements (e.g. want my database on my expensive SSD array's; want my high availability file storage on a Gluster volume or similar) that doesn't make it interesting to have them co-located with the container storage. I don't want to care if the container storage is totally destroyed - I want to just re-create it from our registry on a different host. I keep threatening the devs I work with that I'll wipe the containers regularly, for a reason, and they're specifically and intentionally not backed up. From what I hear, the idea of keeping the containers totally disposable is a key appeal of Docker for many (me included), so I would just not use any volume related functionality that co-mingles the data volumes other than in very special circumstances (e.g. lets say we had static datasets that we'd like to mix with an application in different configurations; but I don't have any actual, real-life use cases for that at the moment; basically I'd only do that if I then also could push those volumes into our registry)
- cpuguy83 12y agoFirst, volumes are 100% separated from containers. If you remove a container, the volumes are not removed unless you explicitly told docker to (docker rm -v <container>). And even then, it won't remove the volume if other containers are using it. That said, it is hard to re-use a volume right now if you removed the last container referencing that volume. The linked PR solves this issue. You can mount these SSD's on the host and then use bind-mounts (docker run -v /host/path:/container/path) to get those into the container. Or you can add the devices to the containers directly ("docker run --device /dev/sdb", for example), but you'd need privilaged access to actually mount the device. The referenced PR itself doesn't really make using things like specialized disks any easier, except you can register them with the volumes subsystem and it will track them form you, ie `docker volumes create --path /path/to/data --name my_speedy_disks`. There was some discussion around being able to deal with devices directly with Docker instead of expecting the admin to handle mounting those devices onto the host so they can be used as volumes. Nothing finalized here. Here is where that discussion happened: https://botbot.me/freenode/docker-dev/2014-10-21/?msg=23911528&page=5 https://botbot.me/freenode/docker-dev/2014-10-21/?msg=239115...
- vidarh 12y agoI think the "docker volumes create --path ..." solves my use case just fine. Thanks for providing details - that seems quite useful.