跳转到主内容

使用Kubernetes或OpenShift的Trident是否可以减小已部署的永久性卷(PV)的大小?

Views:
3
Visibility:
Public
Votes:
0
Category:
astra_trident<a>用于翻译</a>
Specialty:
snapx
Last Updated:

适用场景

  • Trident for Kubernetes /OpenShift 19.07及更高版本
  • Kubernetes (K8s) 1.16及更高版本
  • OpenShift 4.5及更高版本

问题解答

在Kubernetes 1.16和等效的OpenShift 4.5中为存储类添加了allowVolumeExpansion选项、Trident 19.07及更高版本支持此选项、以便在 部署永久性卷后轻松增加其大小

但是、当前尚未实施卷大小缩减/缩减、并且系统会根据当前大小检查size参数、以确保仅与现有卷大小相比增加大小。另请参见 iSCSI扩展下的第二点

除了创建替代PV和迁移数据之外、可能的用途是减少ONTAP 存储上聚合的空间使用量、方法是通常不使用空间预留、而将其保留在精简配置上。可以对后端定义或存储类进行检查、这是默认值。

追加信息

尽管当卷中的可用空间充足时似乎是合理的、 卷的大小也应该可以减小、对于iSCSI PV、这是不可能的、因为虚拟磁盘上的数据位置可能位于虚拟化文件的末尾、这意味着减小大小可能会丢失数据。

对于NFS卷、理论上可以实施此功能、但需要Kubernetes本身提供类似的设置(例如allowVolumeReduction)。

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.