{"action":"created","comment":{"url":"https://api.github.com/repos/rancher/rancher.github.io/pulls/comments/122540481","pull_request_review_id":44671493,"id":122540481,"diff_hunk":"@@ -0,0 +1,214 @@\n+---\n+title: Volumes in Rancher\n+layout: rancher-default-v1.6\n+version: v1.6\n+lang: en\n+---\n+\n+## Volumes\n+---\n+\n+### Overview\n+\n+Persistent volumes are a very important part of a stateful application. Rancher makes working with volumes in multi-host environments a simple process.\n+\n+#### Terminology\n+\n+A `volume plugin` and `volume driver` are used interchangeably in Docker and Rancher documentation. They refer to the same thing: a plugin that provides local or shared persistent volumes to a Docker container.\n+\n+A `storage driver` pertains to how containers and images are stored and managed on your Docker hosts. Examples are: aufs, btrfs, zfs, devicemapper. These drivers are beyond the scope of Rancher. More information is available [here](https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/).\n+\n+### Managing Volumes\n+\n+In this section you’re going to learn how to create persistent volumes that may be shared between containers.\n+\n+#### Create a Volume\n+\n+You can create a volume with the `rancher volume create` command.\n+\n+```\n+$ rancher volume create --driver local app-data\n+```\n+\n+This will create a new local volume with name `app-data`. The name must start with an alphanumeric character, followed by `a-z0-9`, `_` (underscore), `.` (period) or `-` (hyphen). \n+\n+The `--driver` flag specifies the volume driver to use. Docker ships with a `local` volume driver. Volumes using this driver persist their data to the host filesystem and are accessible to any container on the same host.\n+\n+#### List Volumes\n+\n+You can list volumes in an environment.\n+\n+```\n+$ rancher volume ls\n+```\n+\n+If you created the `app-data` volume from the previous section, you may wonder why it wasn't listed. You can include `inactive` volumes with the `--all` or `-a` flag.\n+\n+```\n+$ rancher volume ls --all\n+```\n+\n+#### Delete a Volume\n+\n+You can delete a volume with the `rancher volume rm` command.\n+\n+```\n+$ rancher volume rm app-data\n+```\n+\n+#### Volume States\n+\n+Volumes have seven distinct states: `inactive`, `activating`, `active`, `deactivating`, `detached`, `removing` and `removed`.\n+\n+A newly-created volume is in `inactive` state until a container attempts to attach to it.\n+\n+When a container is created, associated volumes enter `activating` state. Once the container enters the `running` phase, its volumes enter `active` state. Containers attaching to an already `active` volume will not impact that volume's state.\n+\n+When all containers attached to a volume are marked for deletion, the volume enters a `dactivating` state. Once the conatiners are deleted, the volume enters `detached` state.\n+\n+When a volume is marked for deletion, it enters a `removing` state. Once the data is deleted from the host(s), it enters `removed` state. Removed volumes will not appear when listing volumes, but they continue to exist in Rancher API for a period of time for debugging and auditing purposes.\n+\n+### Volume Scopes\n+\n+There are two different volume scopes. The scope refers to the level at which the volume is managed by Rancher.\n+\n+#### Environment Scope\n+\n+An `environment scope` volume may be shared by all containers in an environment. Rancher schedules a container appropriately based on the hosts that have access to its assigned volumes.","path":"rancher/v1.6/en/cattle/volumes/index.md","position":77,"original_position":77,"commit_id":"3379e42f40ce8314c07a2ba4ccbbed97dfb41216","original_commit_id":"3379e42f40ce8314c07a2ba4ccbbed97dfb41216","user":{"login":"cjellick","id":2473240,"avatar_url":"https://avatars2.githubusercontent.com/u/2473240?v=3","gravatar_id":"","url":"https://api.github.com/users/cjellick","html_url":"https://github.com/cjellick","followers_url":"https://api.github.com/users/cjellick/followers","following_url":"https://api.github.com/users/cjellick/following{/other_user}","gists_url":"https://api.github.com/users/cjellick/gists{/gist_id}","starred_url":"https://api.github.com/users/cjellick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjellick/subscriptions","organizations_url":"https://api.github.com/users/cjellick/orgs","repos_url":"https://api.github.com/users/cjellick/repos","events_url":"https://api.github.com/users/cjellick/events{/privacy}","received_events_url":"https://api.github.com/users/cjellick/received_events","type":"User","site_admin":false},"body":"NOt sure if mentioned rancher-nfs is great here...if you can say what I'm trying to say without specifically mentioning a volume driver, that might be better","created_at":"2017-06-16T21:49:51Z","updated_at":"2017-06-16T21:49:51Z","html_url":"https://github.com/rancher/rancher.github.io/pull/799#discussion_r122540481","pull_request_url":"https://api.github.com/repos/rancher/rancher.github.io/pulls/799","_links":{"self":{"href":"https://api.github.com/repos/rancher/rancher.github.io/pulls/comments/122540481"},"html":{"href":"https://github.com/rancher/rancher.github.io/pull/799#discussion_r122540481"},"pull_request":{"href":"https://api.github.com/repos/rancher/rancher.github.io/pulls/799"}}},"pull_request":{"url":"https://api.github.com/repos/rancher/rancher.github.io/pulls/799","id":126117584,"html_url":"https://github.com/rancher/rancher.github.io/pull/799","diff_url":"https://github.com/rancher/rancher.github.io/pull/799.diff","patch_url":"https://github.com/rancher/rancher.github.io/pull/799.patch","issue_url":"https://api.github.com/repos/rancher/rancher.github.io/issues/799","number":799,"state":"open","locked":false,"title":"Document volume usage in cattle","user":{"login":"LLParse","id":6145659,"avatar_url":"https://avatars1.githubusercontent.com/u/6145659?v=3","gravatar_id":"","url":"https://api.github.com/users/LLParse","html_url":"https://github.com/LLParse","followers_url":"https://api.github.com/users/LLParse/followers","following_url":"https://api.github.com/users/LLParse/following{/other_user}","gists_url":"https://api.github.com/users/LLParse/gists{/gist_id}","starred_url":"https://api.github.com/users/LLParse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLParse/subscriptions","organizations_url":"https://api.github.com/users/LLParse/orgs","repos_url":"https://api.github.com/users/LLParse/repos","events_url":"https://api.github.com/users/LLParse/events{/privacy}","received_events_url":"https://api.github.com/users/LLParse/received_events","type":"User","site_admin":false},"body":"This document describe how to use volumes within cattle. It covers\r\ndifferent volume scopes, volume management with Rancher CLI, and\r\nexplains the difference between v2 and v1 compose.","created_at":"2017-06-16T21:20:08Z","updated_at":"2017-06-16T21:49:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d139f549335f11ac84369e55178679efd2d69a81","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/rancher/rancher.github.io/pulls/799/commits","review_comments_url":"https://api.github.com/repos/rancher/rancher.github.io/pulls/799/comments","review_comment_url":"https://api.github.com/repos/rancher/rancher.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rancher/rancher.github.io/issues/799/comments","statuses_url":"https://api.github.com/repos/rancher/rancher.github.io/statuses/3379e42f40ce8314c07a2ba4ccbbed97dfb41216","head":{"label":"LLParse:cattle-volume-plugins","ref":"cattle-volume-plugins","sha":"3379e42f40ce8314c07a2ba4ccbbed97dfb41216","user":{"login":"LLParse","id":6145659,"avatar_url":"https://avatars1.githubusercontent.com/u/6145659?v=3","gravatar_id":"","url":"https://api.github.com/users/LLParse","html_url":"https://github.com/LLParse","followers_url":"https://api.github.com/users/LLParse/followers","following_url":"https://api.github.com/users/LLParse/following{/other_user}","gists_url":"https://api.github.com/users/LLParse/gists{/gist_id}","starred_url":"https://api.github.com/users/LLParse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLParse/subscriptions","organizations_url":"https://api.github.com/users/LLParse/orgs","repos_url":"https://api.github.com/users/LLParse/repos","events_url":"https://api.github.com/users/LLParse/events{/privacy}","received_events_url":"https://api.github.com/users/LLParse/received_events","type":"User","site_admin":false},"repo":{"id":78039163,"name":"rancher.github.io","full_name":"LLParse/rancher.github.io","owner":{"login":"LLParse","id":6145659,"avatar_url":"https://avatars1.githubusercontent.com/u/6145659?v=3","gravatar_id":"","url":"https://api.github.com/users/LLParse","html_url":"https://github.com/LLParse","followers_url":"https://api.github.com/users/LLParse/followers","following_url":"https://api.github.com/users/LLParse/following{/other_user}","gists_url":"https://api.github.com/users/LLParse/gists{/gist_id}","starred_url":"https://api.github.com/users/LLParse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLParse/subscriptions","organizations_url":"https://api.github.com/users/LLParse/orgs","repos_url":"https://api.github.com/users/LLParse/repos","events_url":"https://api.github.com/users/LLParse/events{/privacy}","received_events_url":"https://api.github.com/users/LLParse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LLParse/rancher.github.io","description":null,"fork":true,"url":"https://api.github.com/repos/LLParse/rancher.github.io","forks_url":"https://api.github.com/repos/LLParse/rancher.github.io/forks","keys_url":"https://api.github.com/repos/LLParse/rancher.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LLParse/rancher.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LLParse/rancher.github.io/teams","hooks_url":"https://api.github.com/repos/LLParse/rancher.github.io/hooks","issue_events_url":"https://api.github.com/repos/LLParse/rancher.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/LLParse/rancher.github.io/events","assignees_url":"https://api.github.com/repos/LLParse/rancher.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/LLParse/rancher.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/LLParse/rancher.github.io/tags","blobs_url":"https://api.github.com/repos/LLParse/rancher.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LLParse/rancher.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LLParse/rancher.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/LLParse/rancher.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LLParse/rancher.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/LLParse/rancher.github.io/languages","stargazers_url":"https://api.github.com/repos/LLParse/rancher.github.io/stargazers","contributors_url":"https://api.github.com/repos/LLParse/rancher.github.io/contributors","subscribers_url":"https://api.github.com/repos/LLParse/rancher.github.io/subscribers","subscription_url":"https://api.github.com/repos/LLParse/rancher.github.io/subscription","commits_url":"https://api.github.com/repos/LLParse/rancher.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/LLParse/rancher.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/LLParse/rancher.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/LLParse/rancher.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/LLParse/rancher.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/LLParse/rancher.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LLParse/rancher.github.io/merges","archive_url":"https://api.github.com/repos/LLParse/rancher.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LLParse/rancher.github.io/downloads","issues_url":"https://api.github.com/repos/LLParse/rancher.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/LLParse/rancher.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/LLParse/rancher.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/LLParse/rancher.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LLParse/rancher.github.io/labels{/name}","releases_url":"https://api.github.com/repos/LLParse/rancher.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/LLParse/rancher.github.io/deployments","created_at":"2017-01-04T17:52:37Z","updated_at":"2017-01-04T17:52:43Z","pushed_at":"2017-06-16T21:14:28Z","git_url":"git://github.com/LLParse/rancher.github.io.git","ssh_url":"git@github.com:LLParse/rancher.github.io.git","clone_url":"https://github.com/LLParse/rancher.github.io.git","svn_url":"https://github.com/LLParse/rancher.github.io","homepage":null,"size":10846,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rancher:master","ref":"master","sha":"869951bdbfba2cb377b2390856fa5208d4591800","user":{"login":"rancher","id":9343010,"avatar_url":"https://avatars0.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"repo":{"id":39178161,"name":"rancher.github.io","full_name":"rancher/rancher.github.io","owner":{"login":"rancher","id":9343010,"avatar_url":"https://avatars0.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rancher/rancher.github.io","description":null,"fork":false,"url":"https://api.github.com/repos/rancher/rancher.github.io","forks_url":"https://api.github.com/repos/rancher/rancher.github.io/forks","keys_url":"https://api.github.com/repos/rancher/rancher.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rancher/rancher.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rancher/rancher.github.io/teams","hooks_url":"https://api.github.com/repos/rancher/rancher.github.io/hooks","issue_events_url":"https://api.github.com/repos/rancher/rancher.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/rancher/rancher.github.io/events","assignees_url":"https://api.github.com/repos/rancher/rancher.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/rancher/rancher.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/rancher/rancher.github.io/tags","blobs_url":"https://api.github.com/repos/rancher/rancher.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rancher/rancher.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rancher/rancher.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/rancher/rancher.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rancher/rancher.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/rancher/rancher.github.io/languages","stargazers_url":"https://api.github.com/repos/rancher/rancher.github.io/stargazers","contributors_url":"https://api.github.com/repos/rancher/rancher.github.io/contributors","subscribers_url":"https://api.github.com/repos/rancher/rancher.github.io/subscribers","subscription_url":"https://api.github.com/repos/rancher/rancher.github.io/subscription","commits_url":"https://api.github.com/repos/rancher/rancher.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/rancher/rancher.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/rancher/rancher.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/rancher/rancher.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/rancher/rancher.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/rancher/rancher.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rancher/rancher.github.io/merges","archive_url":"https://api.github.com/repos/rancher/rancher.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rancher/rancher.github.io/downloads","issues_url":"https://api.github.com/repos/rancher/rancher.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/rancher/rancher.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/rancher/rancher.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/rancher/rancher.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rancher/rancher.github.io/labels{/name}","releases_url":"https://api.github.com/repos/rancher/rancher.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/rancher/rancher.github.io/deployments","created_at":"2015-07-16T05:28:54Z","updated_at":"2017-05-01T09:19:55Z","pushed_at":"2017-06-16T21:20:08Z","git_url":"git://github.com/rancher/rancher.github.io.git","ssh_url":"git@github.com:rancher/rancher.github.io.git","clone_url":"https://github.com/rancher/rancher.github.io.git","svn_url":"https://github.com/rancher/rancher.github.io","homepage":null,"size":10844,"stargazers_count":32,"watchers_count":32,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":202,"mirror_url":null,"open_issues_count":12,"forks":202,"open_issues":12,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rancher/rancher.github.io/pulls/799"},"html":{"href":"https://github.com/rancher/rancher.github.io/pull/799"},"issue":{"href":"https://api.github.com/repos/rancher/rancher.github.io/issues/799"},"comments":{"href":"https://api.github.com/repos/rancher/rancher.github.io/issues/799/comments"},"review_comments":{"href":"https://api.github.com/repos/rancher/rancher.github.io/pulls/799/comments"},"review_comment":{"href":"https://api.github.com/repos/rancher/rancher.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rancher/rancher.github.io/pulls/799/commits"},"statuses":{"href":"https://api.github.com/repos/rancher/rancher.github.io/statuses/3379e42f40ce8314c07a2ba4ccbbed97dfb41216"}}}}
{"actor":{"display_login":"cjellick"}}