如果pvc处于发布状态,我们可以将其分配给pv吗? [英] Can we assign pvc to a pv if it is in Released state?

查看:78
本文介绍了如果pvc处于发布状态,我们可以将其分配给pv吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在处于已发布状态的持久卷之后,我们可以将持久卷声明分配给持久卷吗?尝试过但不能

Can we assign Persistent volume claim to a Persistent Volume after it is in Released state? Tried it but can't

推荐答案

是.看看官方文档:

回收

用完卷后,他们可以从允许回收资源的API中删除PVC对象.PersistentVolume的回收策略告诉集群该怎么做声明已被发布之后的卷.现在,卷可以保留,回收或删除.

When a user is done with their volume, they can delete the PVC objects from the > API that allows reclamation of the resource. The reclaim policy for a PersistentVolume tells the cluster what to do with the volume after it has been released of its claim. Currently, volumes can either be Retained, Recycled, or Deleted.

保留

保留回收策略允许手动回收资源.删除PersistentVolumeClaim后,PersistentVolume仍然存在,并且该卷被视为已释放".但这还不能用于其他索赔,因为前一个索赔人的数据仍保留在卷中.管理员可以手动通过以下步骤回收该卷.

The Retain reclaim policy allows for manual reclamation of the resource. When the PersistentVolumeClaim is deleted, the PersistentVolume still exists and the volume is considered "released". But it is not yet available for another claim because the previous claimant’s data remains on the volume. An administrator can manually reclaim the volume with the following steps.

  1. 删除持久卷.外部的关联存储资产基础架构(例如AWS EBS,GCE PD,Azure Disk或Cinder)PV删除后仍然存在).
  2. 手动清理相应存储资产上的数据.
  3. 手动删除关联的存储资产,或者如果您想重复使用相同的存储资产,使用存储资产创建一个新的PersistentVolume定义.

请让我知道是否有帮助.

Please let me know if that helped.

这篇关于如果pvc处于发布状态,我们可以将其分配给pv吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆