@@ -657,6 +657,7 @@ func (r *MantleBackupReconciler) verify(
657657 },
658658 makeVerifyPVName (backup ),
659659 labelComponentVerifyVolume ,
660+ true ,
660661 ); err != nil {
661662 return fmt .Errorf ("failed to create a static PV with the clone: %w" , err )
662663 }
@@ -2070,6 +2071,7 @@ func (r *MantleBackupReconciler) reconcileZeroOutJob(
20702071 snapshotTarget .pv .Spec .Capacity ,
20712072 MakeZeroOutPVName (backup ),
20722073 labelComponentZeroOutVolume ,
2074+ false ,
20732075 ); err != nil {
20742076 return ctrl.Result {}, err
20752077 }
@@ -2110,6 +2112,7 @@ func (r *MantleBackupReconciler) reconcileZeroOutJob(
21102112// capacity - resource capacity for the PV
21112113// newPvName - name for the new or updated PV
21122114// componentName - label value for the component
2115+ // addFlatten - whether to add deep-flatten feature to the volume attributes
21132116//
21142117// Returns an error if creation or update fails.
21152118func (r * MantleBackupReconciler ) createOrUpdateStaticPV (
@@ -2118,6 +2121,7 @@ func (r *MantleBackupReconciler) createOrUpdateStaticPV(
21182121 volume string ,
21192122 capacity corev1.ResourceList ,
21202123 newPvName , componentName string ,
2124+ addFlatten bool ,
21212125) error {
21222126 var pv corev1.PersistentVolume
21232127 pv .SetName (newPvName )
@@ -2149,8 +2153,16 @@ func (r *MantleBackupReconciler) createOrUpdateStaticPV(
21492153 if pv .Spec .CSI .VolumeAttributes == nil {
21502154 pv .Spec .CSI .VolumeAttributes = map [string ]string {}
21512155 }
2156+ feature := basePV .Spec .CSI .VolumeAttributes ["imageFeatures" ]
2157+ if addFlatten {
2158+ if len (feature ) > 0 {
2159+ feature = feature + ",deep-flatten"
2160+ } else {
2161+ feature = "deep-flatten"
2162+ }
2163+ }
21522164 pv .Spec .CSI .VolumeAttributes ["clusterID" ] = basePV .Spec .CSI .VolumeAttributes ["clusterID" ]
2153- pv .Spec .CSI .VolumeAttributes ["imageFeatures" ] = basePV . Spec . CSI . VolumeAttributes [ "imageFeatures" ]
2165+ pv .Spec .CSI .VolumeAttributes ["imageFeatures" ] = feature
21542166 pv .Spec .CSI .VolumeAttributes ["imageFormat" ] = basePV .Spec .CSI .VolumeAttributes ["imageFormat" ]
21552167 pv .Spec .CSI .VolumeAttributes ["pool" ] = basePV .Spec .CSI .VolumeAttributes ["pool" ]
21562168 pv .Spec .CSI .VolumeAttributes ["staticVolume" ] = "true"
@@ -2308,7 +2320,7 @@ func (r *MantleBackupReconciler) createOrUpdateVerifyJob(ctx context.Context, jo
23082320 Name : "verify" ,
23092321 Image : r .podImage ,
23102322 Command : []string {
2311- "/user /sbin/e2fsck" ,
2323+ "/usr /sbin/e2fsck" ,
23122324 "-fn" ,
23132325 "/dev/verify-rbd" ,
23142326 },
0 commit comments