{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/openshift-docs/pulls/comments/32929120","id":32929120,"diff_hunk":"@@ -74,30 +56,86 @@ persistent-volume.json\n ----\n ====\n \n+=== Enforcing Disk Quotas\n+Use disk partitions to enforce disk quotas and size constraints. Each partition\n+can be its own export. Each export is one persistent volume. Kubernetes enforces\n+unique names for persistent volumes, but the uniqueness of the NFS volume's\n+server and path is up to the administrator.\n+\n+Enforcing quotas in this way allows the end user to request persistent storage\n+by a specific amount (e.g,, 10Gi) and be matched with a corresponding volume of\n+equal or greater capacity.\n+\n+=== Volume Security\n+Users request storage with a `*PersistentVolumeClaim*`. This claim only lives in\n+the user's namespace and can only be referenced by a pod within that same\n+namespace. Any attempt to access a persistent volume across a namespace causes\n+the pod to fail.\n+\n+Each NFS volume must be mountable by all nodes in the cluster.\n+\n+== Reclaiming Resources\n+NFS implements the Kubernetes *Recyclable* plug-in interface. Automatic\n+processes handle reclamation tasks based on policies set on each persistent\n+volume.\n+\n+By default, persistent volumes are set to *Retain*. NFS volumes which are set to\n+*Recycle* are scrubbed (i.e., `rm -rf` is run on the volume) after being\n+released from their claim (i.e, after the user's `*PersistentVolumeClaim*` bound\n+to the volume is deleted). Once recycled, the NFS volume can be bound to a new\n+claim.\n \n == Automation\n+As discussed, clusters can be provisioned with persistent storage using NFS in\n+the following way:\n+\n+- Disk partitions can be used to link:#enforcing-disk-quotas[enforce storage\n+quotas].\n+- Security can be enforced by link:#volume-security[restricting volumes] to the\n+namespace that has a claim to them.\n+- link:#reclaiming-resources[Reclamation of discarded resources] can be\n+configured for each persistent volume.\n \n-In this topic, we covered how a cluster can be provisioned with persistent storage using NFS.  Disk partitions can be\n-used to enforce storage quotas, security is enforced by restricting volumes to the namespace that has a claim to them, and\n-reclamation of discarded resources can be configured for each persistent volume.\n+They are many ways that you can use scripts to automate the above tasks. You can\n+use an\n+link:https://github.com/openshift/openshift-ansible/tree/master/roles/kube_nfs_volumes[example\n+Ansible playbook] to help you get started.\n+\n+== SELinux and NFS Export Settings\n+By default, SELinux does not allow writing from a pod to a remote NFS server.\n+The NFS volume mounts correctly, but is read-only.\n+\n+To enable writing in SELinux on each node:\n+\n+----\n+# setsebool -P virt_use_nfs 1 <1>","path":"admin_guide/persistent_storage_nfs.adoc","position":136,"original_position":136,"commit_id":"8bb9e6bebf3af08ed2e07e2d3e82d2471ece6282","original_commit_id":"8bb9e6bebf3af08ed2e07e2d3e82d2471ece6282","user":{"login":"adellape","id":3442316,"avatar_url":"https://avatars.githubusercontent.com/u/3442316?v=3","gravatar_id":"","url":"https://api.github.com/users/adellape","html_url":"https://github.com/adellape","followers_url":"https://api.github.com/users/adellape/followers","following_url":"https://api.github.com/users/adellape/following{/other_user}","gists_url":"https://api.github.com/users/adellape/gists{/gist_id}","starred_url":"https://api.github.com/users/adellape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adellape/subscriptions","organizations_url":"https://api.github.com/users/adellape/orgs","repos_url":"https://api.github.com/users/adellape/repos","events_url":"https://api.github.com/users/adellape/events{/privacy}","received_events_url":"https://api.github.com/users/adellape/received_events","type":"User","site_admin":false},"body":"/me hears \"Don't Call It a Comeback\" in head...","created_at":"2015-06-22T12:36:59Z","updated_at":"2015-06-22T12:36:59Z","html_url":"https://github.com/openshift/openshift-docs/pull/579#discussion_r32929120","pull_request_url":"https://api.github.com/repos/openshift/openshift-docs/pulls/579","_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/comments/32929120"},"html":{"href":"https://github.com/openshift/openshift-docs/pull/579#discussion_r32929120"},"pull_request":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/579"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/openshift-docs/pulls/579","id":38155157,"html_url":"https://github.com/openshift/openshift-docs/pull/579","diff_url":"https://github.com/openshift/openshift-docs/pull/579.diff","patch_url":"https://github.com/openshift/openshift-docs/pull/579.patch","issue_url":"https://api.github.com/repos/openshift/openshift-docs/issues/579","number":579,"state":"closed","locked":false,"title":"Edits to persistent_storage_nfs","user":{"login":"adellape","id":3442316,"avatar_url":"https://avatars.githubusercontent.com/u/3442316?v=3","gravatar_id":"","url":"https://api.github.com/users/adellape","html_url":"https://github.com/adellape","followers_url":"https://api.github.com/users/adellape/followers","following_url":"https://api.github.com/users/adellape/following{/other_user}","gists_url":"https://api.github.com/users/adellape/gists{/gist_id}","starred_url":"https://api.github.com/users/adellape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adellape/subscriptions","organizations_url":"https://api.github.com/users/adellape/orgs","repos_url":"https://api.github.com/users/adellape/repos","events_url":"https://api.github.com/users/adellape/events{/privacy}","received_events_url":"https://api.github.com/users/adellape/received_events","type":"User","site_admin":false},"body":"Minor formatting, FYI @markturansky.\r\n\r\n@sosiouxme I think it's fine, but could you ack that the SELinux section is still sane?","created_at":"2015-06-19T22:53:24Z","updated_at":"2015-06-22T12:36:59Z","closed_at":"2015-06-21T01:32:39Z","merged_at":"2015-06-21T01:32:39Z","merge_commit_sha":"950d9e3c9e1b0eb4b76a2db14e445a27299774c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/openshift-docs/pulls/579/commits","review_comments_url":"https://api.github.com/repos/openshift/openshift-docs/pulls/579/comments","review_comment_url":"https://api.github.com/repos/openshift/openshift-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/openshift-docs/issues/579/comments","statuses_url":"https://api.github.com/repos/openshift/openshift-docs/statuses/8bb9e6bebf3af08ed2e07e2d3e82d2471ece6282","head":{"label":"adellape:nfs_edits","ref":"nfs_edits","sha":"8bb9e6bebf3af08ed2e07e2d3e82d2471ece6282","user":{"login":"adellape","id":3442316,"avatar_url":"https://avatars.githubusercontent.com/u/3442316?v=3","gravatar_id":"","url":"https://api.github.com/users/adellape","html_url":"https://github.com/adellape","followers_url":"https://api.github.com/users/adellape/followers","following_url":"https://api.github.com/users/adellape/following{/other_user}","gists_url":"https://api.github.com/users/adellape/gists{/gist_id}","starred_url":"https://api.github.com/users/adellape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adellape/subscriptions","organizations_url":"https://api.github.com/users/adellape/orgs","repos_url":"https://api.github.com/users/adellape/repos","events_url":"https://api.github.com/users/adellape/events{/privacy}","received_events_url":"https://api.github.com/users/adellape/received_events","type":"User","site_admin":false},"repo":{"id":29119125,"name":"openshift-docs","full_name":"adellape/openshift-docs","owner":{"login":"adellape","id":3442316,"avatar_url":"https://avatars.githubusercontent.com/u/3442316?v=3","gravatar_id":"","url":"https://api.github.com/users/adellape","html_url":"https://github.com/adellape","followers_url":"https://api.github.com/users/adellape/followers","following_url":"https://api.github.com/users/adellape/following{/other_user}","gists_url":"https://api.github.com/users/adellape/gists{/gist_id}","starred_url":"https://api.github.com/users/adellape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adellape/subscriptions","organizations_url":"https://api.github.com/users/adellape/orgs","repos_url":"https://api.github.com/users/adellape/repos","events_url":"https://api.github.com/users/adellape/events{/privacy}","received_events_url":"https://api.github.com/users/adellape/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adellape/openshift-docs","description":"OpenShift Documentation","fork":true,"url":"https://api.github.com/repos/adellape/openshift-docs","forks_url":"https://api.github.com/repos/adellape/openshift-docs/forks","keys_url":"https://api.github.com/repos/adellape/openshift-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adellape/openshift-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adellape/openshift-docs/teams","hooks_url":"https://api.github.com/repos/adellape/openshift-docs/hooks","issue_events_url":"https://api.github.com/repos/adellape/openshift-docs/issues/events{/number}","events_url":"https://api.github.com/repos/adellape/openshift-docs/events","assignees_url":"https://api.github.com/repos/adellape/openshift-docs/assignees{/user}","branches_url":"https://api.github.com/repos/adellape/openshift-docs/branches{/branch}","tags_url":"https://api.github.com/repos/adellape/openshift-docs/tags","blobs_url":"https://api.github.com/repos/adellape/openshift-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adellape/openshift-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adellape/openshift-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/adellape/openshift-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adellape/openshift-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/adellape/openshift-docs/languages","stargazers_url":"https://api.github.com/repos/adellape/openshift-docs/stargazers","contributors_url":"https://api.github.com/repos/adellape/openshift-docs/contributors","subscribers_url":"https://api.github.com/repos/adellape/openshift-docs/subscribers","subscription_url":"https://api.github.com/repos/adellape/openshift-docs/subscription","commits_url":"https://api.github.com/repos/adellape/openshift-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/adellape/openshift-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/adellape/openshift-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/adellape/openshift-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/adellape/openshift-docs/contents/{+path}","compare_url":"https://api.github.com/repos/adellape/openshift-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adellape/openshift-docs/merges","archive_url":"https://api.github.com/repos/adellape/openshift-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adellape/openshift-docs/downloads","issues_url":"https://api.github.com/repos/adellape/openshift-docs/issues{/number}","pulls_url":"https://api.github.com/repos/adellape/openshift-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/adellape/openshift-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/adellape/openshift-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adellape/openshift-docs/labels{/name}","releases_url":"https://api.github.com/repos/adellape/openshift-docs/releases{/id}","created_at":"2015-01-12T04:47:07Z","updated_at":"2015-04-29T21:31:10Z","pushed_at":"2015-06-22T12:34:53Z","git_url":"git://github.com/adellape/openshift-docs.git","ssh_url":"git@github.com:adellape/openshift-docs.git","clone_url":"https://github.com/adellape/openshift-docs.git","svn_url":"https://github.com/adellape/openshift-docs","homepage":null,"size":4282,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"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":"openshift:master","ref":"master","sha":"2b8bc808943ce05e9009b29540cd851194b6e267","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":21740844,"name":"openshift-docs","full_name":"openshift/openshift-docs","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/openshift-docs","description":"OpenShift Documentation","fork":false,"url":"https://api.github.com/repos/openshift/openshift-docs","forks_url":"https://api.github.com/repos/openshift/openshift-docs/forks","keys_url":"https://api.github.com/repos/openshift/openshift-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/openshift-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/openshift-docs/teams","hooks_url":"https://api.github.com/repos/openshift/openshift-docs/hooks","issue_events_url":"https://api.github.com/repos/openshift/openshift-docs/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/openshift-docs/events","assignees_url":"https://api.github.com/repos/openshift/openshift-docs/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/openshift-docs/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/openshift-docs/tags","blobs_url":"https://api.github.com/repos/openshift/openshift-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/openshift-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/openshift-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/openshift-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/openshift-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/openshift-docs/languages","stargazers_url":"https://api.github.com/repos/openshift/openshift-docs/stargazers","contributors_url":"https://api.github.com/repos/openshift/openshift-docs/contributors","subscribers_url":"https://api.github.com/repos/openshift/openshift-docs/subscribers","subscription_url":"https://api.github.com/repos/openshift/openshift-docs/subscription","commits_url":"https://api.github.com/repos/openshift/openshift-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/openshift-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/openshift-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/openshift-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/openshift-docs/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/openshift-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/openshift-docs/merges","archive_url":"https://api.github.com/repos/openshift/openshift-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/openshift-docs/downloads","issues_url":"https://api.github.com/repos/openshift/openshift-docs/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/openshift-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/openshift-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/openshift-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/openshift-docs/labels{/name}","releases_url":"https://api.github.com/repos/openshift/openshift-docs/releases{/id}","created_at":"2014-07-11T15:14:42Z","updated_at":"2015-06-10T10:05:25Z","pushed_at":"2015-06-22T12:19:47Z","git_url":"git://github.com/openshift/openshift-docs.git","ssh_url":"git@github.com:openshift/openshift-docs.git","clone_url":"https://github.com/openshift/openshift-docs.git","svn_url":"https://github.com/openshift/openshift-docs","homepage":null,"size":55651,"stargazers_count":17,"watchers_count":17,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":52,"forks":85,"open_issues":52,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/579"},"html":{"href":"https://github.com/openshift/openshift-docs/pull/579"},"issue":{"href":"https://api.github.com/repos/openshift/openshift-docs/issues/579"},"comments":{"href":"https://api.github.com/repos/openshift/openshift-docs/issues/579/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/579/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/579/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/openshift-docs/statuses/8bb9e6bebf3af08ed2e07e2d3e82d2471ece6282"}}}}