Skip to content

Add docker run/create support multiple volume driver#16513

Closed
coolljt0725 wants to merge 1 commit intomoby:masterfrom
coolljt0725:add_support_multiple_volume_driver
Closed

Add docker run/create support multiple volume driver#16513
coolljt0725 wants to merge 1 commit intomoby:masterfrom
coolljt0725:add_support_multiple_volume_driver

Conversation

@coolljt0725
Copy link
Contributor

Signed-off-by: Lei Jitang [email protected]

This is a original design of support multiple volume driver on docker run/create cli and waiting for some feedback from the community.
The driver should be a part of volume identifier, I think the user should aware what driver the volume used, since different driver have different feature and store the data in different place. In this way user can use multiple volume driver in a single docker run/create cli and
different volume driver can have the same volume name.
Use the sytax name@driver:/dest as the volume identifier as @srust 's proposal.
Here is the example.

[lei@fedora ~]$ docker run -v test@convoy:/data -v test:/test busybox
[lei@fedora ~]$ docker volume ls
DRIVER              VOLUME NAME
convoy              test
local               test

If no driver specified in the volume identifier, use default driver which is specified by --volume-driver, if no, use default local
the docker volume cli should use name@driver, if no driver specified, use default local

[lei@fedora ~]$ docker volume inspect test
[
    {
        "Name": "test",
        "Driver": "local",
        "Mountpoint": "/var/lib/docker/volumes/test/_data"
    }
]
[lei@fedora ~]$ docker volume inspect test@convoy
[
    {
        "Name": "test",
        "Driver": "convoy",
        "Mountpoint": "/var/lib/convoy/devicemapper/mounts/0f1c1fc2-21e3-4f83-99b1-9c23b9be649b"
    }
]

For more information see #15997

@thaJeztah
Copy link
Member

/cc @cpuguy83 @calavera

@cpuguy83
Copy link
Member

-1 on having the driver name in the reference.

@icecrime
Copy link
Contributor

Sorry, also -1 on having the driver name appear in the reference.

To give a bit of explanation: we'd ideally like the driver to use to be part of a "late-binding" definition, potentially defined by the operator rather than by the client starting the container. For example, a volume labelled "red" would be managed by driver "square".

We may or may not pursue down this road, but we definitely would like to avoid drivers to appear here. Sorry!

@icecrime icecrime closed this Oct 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants