持久卷不支持快照(Velero,MinIO,FSB)。

huangapple go评论56阅读模式
英文:

Persistent volume is not a supported volume type for snapshots (Velero, MinIO, FSB)

问题

我们需要在本地 Kubernetes 集群上备份 PV,因此我们安装了 Velero,与 MinIO 进行了链接,并使用 Velero 的文件系统备份功能。没有备份 PV,也没有显示错误,只有在日志中出现了这个提醒:“持久卷不是受支持的快照卷类型,跳过”。有没有人知道如何在本地集群上备份 PV,而不必使用外部云提供商?

详细信息

Velero 是使用以下命令安装的(credentials-minio 包含了 MinIO 存储桶的访问密钥):

velero install \
    --provider aws \
    --plugins velero/velero-plugin-for-aws:v1.2.1 \
    --bucket ka-backup \
    --secret-file ./credentials-minio \
    --use-node-agent \
    --backup-location-config region=minio,s3ForcePathStyle="true",s3Url=http://minio-1679064025.minio.svc:9000 \
    --snapshot-location-config region=minio

对命名空间进行备份的结果没有显示错误,也没有警告,如下所示,阶段的状态是已完成的。

velero backup describe acme -n velero --kubeconfig ../VKATEST.config
Name:         acme
Namespace:    velero
Labels:       velero.io/storage-location=default
Annotations:  velero.io/source-cluster-k8s-gitversion=v1.25.6
              velero.io/source-cluster-k8s-major-version=1
              velero.io/source-cluster-k8s-minor-version=25

Phase:  Completed

Errors:    0
Warnings:  0

Namespaces:
  Included:  acme
  Excluded:  <none>

Resources:
  Included:        *
  Excluded:        <none>
  Cluster-scoped:  auto

Label selector:  <none>

Storage Location:  default

Velero-Native Snapshot PVs:  auto

TTL:  720h0m0s

CSISnapshotTimeout:  10m0s

Hooks:  <none>

Backup Format Version:  1.1.0

Started:    2023-03-20 14:40:18 +0100 CET
Completed:  2023-03-20 14:40:29 +0100 CET

Expiration:  2023-04-19 15:40:18 +0200 CEST

Total items to be backed up:  437
Items backed up:              437

Velero-Native Snapshots: <none included>

在日志中,我们可以读到以下摘录的末尾,即:“持久卷不是受支持的卷类型,不支持快照”。

level=info msg="Backing up item" backup=velero/acme logSource="pkg/backup/item_backupper.go:132" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= resource=persistentvolumes
level=info msg="Executing takePVSnapshot" backup=velero/acme logSource="pkg/backup/item_backupper.go:412" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= resource=persistentvolumes
level=info msg="label \"topology.kubernetes.io/zone\" is not present on PersistentVolume, checking deprecated label..." backup=velero/acme logSource="pkg/backup/item_backupper.go:445" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes
level=info msg="label \"failure-domain.beta.kubernetes.io/zone\" is not present on PersistentVolume" backup=velero/acme logSource="pkg/backup/item_backupper.go:449" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes
level=info msg="zone info not available in nodeAffinity requirements" backup=velero/acme logSource="pkg/backup/item_backupper.go:454" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes
level=info msg="No volume ID returned by volume snapshotter for persistent volume" backup=velero/acme logSource="pkg/backup/item_backupper.go:478" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes volumeSnapshotLocation=default
level=info msg="Persistent volume is not a supported volume type for snapshots, skipping." backup=velero/acme logSource="pkg/backup/item_backupper.go:489" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes

请告诉我们是否有方法能够在本地集群上备份 PV,而不必使用外部云提供商。

英文:

We need to backup PV on an on-premise Kubernetes cluster, so we installed Velero, linked to MinIO, with Velero's File System Backup. No PV are backed up and no error is shown, only this mention appears in the logs "Persistent volume is not a supported volume type for snapshots, skipping". Does someone have a clue to be able to backup PV on an on-premise cluster without having to use external Cloud providers ?

Details

Velero was installed using the following command (credentials-minio containing the MinIO's bucket access keys):

velero install \
    --provider aws \
    --plugins velero/velero-plugin-for-aws:v1.2.1 \
    --bucket ka-backup \
    --secret-file ./credentials-minio \
    --use-node-agent \
    --backup-location-config region=minio,s3ForcePathStyle=&quot;true&quot;,s3Url=http://minio-1679064025.minio.svc:9000 \
    --snapshot-location-config region=minio

The result of a backup of namespaces shows no error, nor warnings as seen below and the status of the phase is completed.

velero backup describe acme -n velero --kubeconfig ../VKATEST.config
Name:         acme
Namespace:    velero
Labels:       velero.io/storage-location=default
Annotations:  velero.io/source-cluster-k8s-gitversion=v1.25.6
              velero.io/source-cluster-k8s-major-version=1
              velero.io/source-cluster-k8s-minor-version=25

Phase:  Completed

Errors:    0
Warnings:  0

Namespaces:
  Included:  acme
  Excluded:  &lt;none&gt;

Resources:
  Included:        *
  Excluded:        &lt;none&gt;
  Cluster-scoped:  auto

Label selector:  &lt;none&gt;

Storage Location:  default

Velero-Native Snapshot PVs:  auto

TTL:  720h0m0s

CSISnapshotTimeout:  10m0s

Hooks:  &lt;none&gt;

Backup Format Version:  1.1.0

Started:    2023-03-20 14:40:18 +0100 CET
Completed:  2023-03-20 14:40:29 +0100 CET

Expiration:  2023-04-19 15:40:18 +0200 CEST

Total items to be backed up:  437
Items backed up:              437

Velero-Native Snapshots: &lt;none included&gt;

In the logs we can read at the end of the following extract, that: "Persistent volume is not a supported volume type for snapshots, skipping".

level=info msg=&quot;Backing up item&quot; backup=velero/acme logSource=&quot;pkg/backup/item_backupper.go:132&quot; name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= resource=persistentvolumes
level=info msg=&quot;Executing takePVSnapshot&quot; backup=velero/acme logSource=&quot;pkg/backup/item_backupper.go:412&quot; name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= resource=persistentvolumes
level=info msg=&quot;label \&quot;topology.kubernetes.io/zone\&quot; is not present on PersistentVolume, checking deprecated label...&quot; backup=velero/acme logSource=&quot;pkg/backup/item_backupper.go:445&quot; name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes
level=info msg=&quot;label \&quot;failure-domain.beta.kubernetes.io/zone\&quot; is not present on PersistentVolume&quot; backup=velero/acme logSource=&quot;pkg/backup/item_backupper.go:449&quot; name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes
level=info msg=&quot;zone info not available in nodeAffinity requirements&quot; backup=velero/acme logSource=&quot;pkg/backup/item_backupper.go:454&quot; name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes
level=info msg=&quot;No volume ID returned by volume snapshotter for persistent volume&quot; backup=velero/acme logSource=&quot;pkg/backup/item_backupper.go:478&quot; name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes volumeSnapshotLocation=default
level=info msg=&quot;Persistent volume is not a supported volume type for snapshots, skipping.&quot; backup=velero/acme logSource=&quot;pkg/backup/item_backupper.go:489&quot; name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes

Please let us know if you have a clue to be able to backup PV on an on-premise cluster without having to use external Cloud providers.

答案1

得分: 1

你是否在执行 Velero 备份时添加了选项 --default-volumes-to-restic(适用于旧版本,如 1.7),或者 --default-volumes-to-fs-backup(新版本)?可能出现与此问题类似的情况:https://stackoverflow.com/questions/75803242/velero-volume-snapshots-contain-no-data-when-restoring-a-backup。

英文:

have you add option --default-volumes-to-restic(for older versions like 1.7) or --default-volumes-to-fs-backup(new versions) when doing velero backup?
could be same problem like: https://stackoverflow.com/questions/75803242/velero-volume-snapshots-contain-no-data-when-restoring-a-backup

huangapple
  • 本文由 发表于 2023年3月20日 23:12:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/75792056.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定