Bug 1316593 - [DOCS] document manual reclaiming of persistent volumes [NEEDINFO]
Summary: [DOCS] document manual reclaiming of persistent volumes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Traci Morrison
QA Contact: Qin Ping
Vikram Goyal
URL: https://access.redhat.com/documentati...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-10 14:47 UTC by Evgheni Dereveanchin
Modified: 2019-12-16 05:30 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-06 18:49:21 UTC
Target Upstream Version:
dmoessne: needinfo? (bchilds)


Attachments (Terms of Use)

Description Evgheni Dereveanchin 2016-03-10 14:47:52 UTC
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-24 00:38:27 UTC
@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 15:42:35 UTC
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 23:54:52 UTC
@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-11 00:55:35 UTC
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-11 01:59:59 UTC
Thanks Traci and Bradley!

Comment 7 Traci Morrison 2018-01-16 16:33:21 UTC
Work in progress: https://github.com/openshift/openshift-docs/pull/7179

Comment 8 Traci Morrison 2018-01-16 19:21:15 UTC
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 19:36:50 UTC
(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 19:44:54 UTC
Hi Brad, can you follow up on Daniel's question? See Comment 9. Thanks.

Comment 11 Traci Morrison 2018-02-05 20:50:15 UTC
Can you follow up on Daniel's question? See Comment 9. Thanks.

Comment 12 Qin Ping 2018-02-06 02:25:16 UTC
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 14:13:00 UTC
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.