Skip to content

Added volumes documentation#2423

Merged
metalivedev merged 2 commits intomoby:masterfrom
rogaha:volumes_doc
Nov 5, 2013
Merged

Added volumes documentation#2423
metalivedev merged 2 commits intomoby:masterfrom
rogaha:volumes_doc

Conversation

@rogaha
Copy link
Copy Markdown
Contributor

@rogaha rogaha commented Oct 28, 2013

fixes #1981

@metalivedev
Copy link
Copy Markdown
Contributor

@crosbymichael -- could you give some comments, especially about the last section?
Why can't volumes be backed-up or mounted from special devices? It seems like they should be able to.

@tianon
Copy link
Copy Markdown
Member

tianon commented Oct 28, 2013

👍 ping @metalivedev

@ghost ghost assigned metalivedev Oct 28, 2013
@rogaha
Copy link
Copy Markdown
Contributor Author

rogaha commented Oct 28, 2013

Also, I was discussing with @metalivedev that when I shared the volume among two containers, it seemed to be copying instead of using the same volume. When I change the data from one container, I don't see that change on the other one and vice-versa. I didn't dig into the code to check that, but it should be a copy or the same volume? @creack @crosbymichael

@rogaha
Copy link
Copy Markdown
Contributor Author

rogaha commented Oct 29, 2013

As I spoke to @crosbymichael it's the same volume. But I'm getting the following behavior:

root@precise64:/home/vagrant# docker inspect f760a2992eba | grep /lib/couchdb
            "/var/lib/couchdb": {}
        "/var/lib/couchdb": "/var/lib/docker/volumes/ccdace3a1eaa30da55133b825ff5e1707696b48f73cc65f2b29452a5ffff3d63/layer"
        "/var/lib/couchdb": true
root@precise64:/home/vagrant# docker inspect 8ed2c2a313e7 | grep /lib/couchdb
        "/var/lib/couchdb": "/var/lib/docker/volumes/ccdace3a1eaa30da55133b825ff5e1707696b48f73cc65f2b29452a5ffff3d63/layer"
        "/var/lib/couchdb": true
root@precise64:/home/vagrant# docker ps
ID                  IMAGE                       COMMAND                CREATED             STATUS              PORTS
8ed2c2a313e7        shykes/couchdb:2013-05-03   /bin/sh -e /usr/bin/   11 days ago         Up 11 days          49156->5984
f760a2992eba        shykes/couchdb:2013-05-03   /bin/sh -e /usr/bin/   11 days ago         Up 11 days          49155->5984
root@precise64:/home/vagrant#

cointainer1
cointainer2

Both containers have the same volume. But I was experiencing some caching issues with CouchDB that seemed to be different volumes. I'll update the documentation with the correct info.

Thanks

@crosbymichael
Copy link
Copy Markdown
Contributor

@rogaha What are the run commands that you are using?

@rogaha
Copy link
Copy Markdown
Contributor Author

rogaha commented Oct 29, 2013

@crosbymichael, I was using the browser interface to change the values. But I was accessing them from a different physical machine using the browser as well.

@shykes
Copy link
Copy Markdown
Contributor

shykes commented Oct 29, 2013

Nice @rogaha ! Thanks for taking care of this.

image

@rogaha
Copy link
Copy Markdown
Contributor Author

rogaha commented Oct 29, 2013

You are welcome! :)

Let's how it goes after @crosbymichael and @metalivedev reviews! I keep working on "missing parts" of the documentation!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is true. Since this is a directory on the host, the host should be able to do a backup of the volume. And if the backup software runs within the container, it can definitely be backed-up somewhere else (I guess that's the piping data into and out of the container). Here I'm assuming "backup" means "copy". If there is some other meaning of backup that would be blocked by the volume, let me know.

@metalivedev
Copy link
Copy Markdown
Contributor

You'll also need to add this to the to sources/use/index.rst to get it to show up.
I'd say add it to the index and remove lines 75-end (until we can get some core engineering input on how they're implementing it) and you'll be good.

@rogaha
Copy link
Copy Markdown
Contributor Author

rogaha commented Nov 4, 2013

Hi @metalivedev,

Thanks for your comments. I'll do that and update the PR.

- Added reference to the index.rst
@vieux
Copy link
Copy Markdown
Contributor

vieux commented Nov 5, 2013

ping @metalivedev

metalivedev pushed a commit that referenced this pull request Nov 5, 2013
Added volumes documentation
@metalivedev metalivedev merged commit bf05eb8 into moby:master Nov 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New section in "Use": "Persisting and sharing data with volumes"

6 participants