Hide Forgot
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
@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.
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.
@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.
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.
Thanks Traci and Bradley!
Work in progress: https://github.com/openshift/openshift-docs/pull/7179
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."?
(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 ?
Hi Brad, can you follow up on Daniel's question? See Comment 9. Thanks.
Can you follow up on Daniel's question? See Comment 9. Thanks.
Add a comment in PR: https://github.com/openshift/openshift-docs/pull/7179 and still a comment is not fixed.
Changes made to the PR, please review. https://github.com/openshift/openshift-docs/pull/7179
Links to updated content: 3.1: https://docs.openshift.com/enterprise/3.1/install_config/persistent_storage/persistent_storage_nfs.html#nfs-reclaiming-resources 3.2: https://docs.openshift.com/enterprise/3.2/install_config/persistent_storage/persistent_storage_nfs.html#nfs-reclaiming-resources 3.3: https://docs.openshift.com/container-platform/3.3/install_config/persistent_storage/persistent_storage_nfs.html#nfs-reclaiming-resources 3.4: https://docs.openshift.com/container-platform/3.4/install_config/persistent_storage/persistent_storage_nfs.html#nfs-reclaiming-resources 3.5: https://docs.openshift.com/container-platform/3.5/install_config/persistent_storage/persistent_storage_nfs.html#nfs-reclaiming-resources 3.6: https://docs.openshift.com/container-platform/3.6/install_config/persistent_storage/persistent_storage_nfs.html#nfs-reclaiming-resources 3.7: https://docs.openshift.com/container-platform/3.7/install_config/persistent_storage/persistent_storage_nfs.html#nfs-reclaiming-resources 3.9: https://docs.openshift.com/container-platform/3.9/install_config/persistent_storage/persistent_storage_nfs.html#nfs-reclaiming-resources