16.4.6.6. Backup CR に LVM Storage 関連のフィールドがない
- 問題
バックアップCR には、永続ボリュームを復元するために必要なフィールドが欠落している可能性があります。以下のコマンドを実行して、アプリケーション Pod 内のイベントを確認し、この問題が発生しているかどうかを判断できます。$ oc describe pod <your_app_name>以下の出力例は、
バックアップCR に LVM ストレージ関連のフィールドが欠落しているために Pod が失敗したことを示しています。Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedScheduling 58s (x2 over 66s) default-scheduler 0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.. Normal Scheduled 56s default-scheduler Successfully assigned default/db-1234 to sno1.example.lab Warning FailedMount 24s (x7 over 55s) kubelet MountVolume.SetUp failed for volume "pvc-1234" : rpc error: code = Unknown desc = VolumeID is not found- 解決方法
アプリケーション
BackupCR にlogicalvolumes.topolvm.ioを含める必要があります。このリソースがない場合、アプリケーションは永続ボリューム要求と永続ボリュームマニフェストを正しく復元しますが、この永続ボリュームに関連付けられたlogicalvolumeはピボット後に適切に復元されません。以下の例は、正しく設定されたバックアップCR を示しています。apiVersion: velero.io/v1 kind: Backup metadata: labels: velero.io/storage-location: default name: small-app namespace: openshift-adp spec: includedNamespaces: - test includedNamespaceScopedResources: - secrets - persistentvolumeclaims - deployments - statefulsets includedClusterScopedResources: - persistentVolumes - volumesnapshotcontents - logicalvolumes.topolvm.ioアプリケーションの永続ボリュームを復元するには、以下のように
includedClusterScopedResourcesセクションを設定する必要があります。