Bug 1316593 - [DOCS] document manual reclaiming of persistent volumes [NEEDINFO]
[DOCS] document manual reclaiming of persistent volumes
Status: RELEASE_PENDING
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Traci Morrison
Qin Ping
Vikram Goyal
https://access.redhat.com/documentati...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-10 09:47 EST by Evgheni Dereveanchin
Modified: 2018-02-20 11:13 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
dmoessne: needinfo? (bchilds)


Attachments (Terms of Use)

  None (edit)
Description Evgheni Dereveanchin 2016-03-10 09:47:52 EST
Document URL: 
 https://access.redhat.com/documentation/en/openshift-enterprise/version-3.1/installation-and-configuration/#nfs-reclaiming-resources

Section Number and Name: 
 13.2. PERSISTENT STORAGE USING NFS
 13.2.3. Reclaiming Resources

Describe the issue: 
 by default, persistent volumes are set to Retain, so after the PVC is removed the PV goes into a Released state. However there is no information on how to manually recycle the PV and mark it as Available

Suggestions for improvement: 
 document the steps to move a PV from Released back to the Available state.

Additional information: 
 this also needs to be covered for PV types other than NFS
Comment 2 Vikram Goyal 2017-12-23 19:38:27 EST
@Traci - please liaise with the storage team to figure out:

1. How to do this for other storage types as well.
2. Whether the same steps apply to 3.1 + all versions. This is important to get right because the same steps may not apply in the new versions.
Comment 3 Traci Morrison 2018-01-10 10:42:35 EST
Brad, can you provide the note that we need to include for customers?

@Vikram - the team discussed this on the call today, and determined that we can include a note that applies to 3.1 + all versions. Once I have the note, I will edit the content and create a pull request.
Comment 4 Bradley Childs 2018-01-10 18:54:52 EST
@traci - The note should be something like:

"Once claim to a PV is released (ie. PVC deleted) the PV object should not be re-used.  Instead, a new PV should be created with the same basic volume details as the original.

Example.  Admin creates PV named nfs1:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: nfs1
spec:
  capacity:
    storage: 1Mi
  accessModes:
    - ReadWriteMany
  nfs:
    server: 192.168.1.1
    path: "/"

User creates PVC1 which binds to nfs1.  User then deletes PVC1 releasing claim to nfs1 causing nfs1 to show "Released" status.  If the admin wishes to make the same NFS share available, she should create a new PV with the same NFS server details, but a different PV name:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: nfs2
spec:
  capacity:
    storage: 1Mi
  accessModes:
    - ReadWriteMany
  nfs:
    server: 192.168.1.1
    path: "/"

Deleting the original PV and re-creating it with the same name is discouraged as bad practice.  Attempting to manually change the status of a PV from Released to Available will cause errors and potential data loss.
Comment 5 Bradley Childs 2018-01-10 19:55:35 EST
Adding to my comment, we should also include a blurb about recycle:

"A PV with retention policy of Recycle will scrub (rm -rf) the data and mark it as Available.. The Recycle retention policy is deprecated in future versions and should be avoided..."  

I believe we already mention the recycler deprecation in 3.6+ docs.
Comment 6 Vikram Goyal 2018-01-10 20:59:59 EST
Thanks Traci and Bradley!
Comment 7 Traci Morrison 2018-01-16 11:33:21 EST
Work in progress: https://github.com/openshift/openshift-docs/pull/7179
Comment 8 Traci Morrison 2018-01-16 14:21:15 EST
Also, we need to be more specific when saying future versions: 

"A PV with retention policy of `Recycle` will scrub (`rm -rf`) the data and mark it as `Available` for claim. The `Recycle` retention policy is deprecated in future versions and should be avoided."

Is it correct to say "The `Recycle` retention policy is deprecated after version 3.7."?
Comment 9 daniel 2018-01-18 14:36:50 EST
(In reply to Bradley Childs from comment #4)
> 
> Deleting the original PV and re-creating it with the same name is
> discouraged as bad practice.  Attempting to manually change the status of a
> PV from Released to Available will cause errors and potential data loss.

May I kindly ask why this is discouraged, are there any technical details against this, and what would be potential issues if still done ?
Comment 10 Traci Morrison 2018-01-26 14:44:54 EST
Hi Brad, can you follow up on Daniel's question? See Comment 9. Thanks.
Comment 11 Traci Morrison 2018-02-05 15:50:15 EST
Can you follow up on Daniel's question? See Comment 9. Thanks.
Comment 12 Qin Ping 2018-02-05 21:25:16 EST
Add a comment in PR: https://github.com/openshift/openshift-docs/pull/7179 and still a comment is not fixed.
Comment 13 Traci Morrison 2018-02-06 09:13:00 EST
Changes made to the PR, please review. 

https://github.com/openshift/openshift-docs/pull/7179

Note You need to log in before you can comment on or make changes to this bug.