Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-55056

Storage Migration: ability to switch volumeMode and accessMode of the target volumes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Critical Critical
    • CNV v4.18.0
    • CNV v4.18.0
    • CNV User Interface
    • None
    • Quality / Stability / Reliability
    • 0.42
    • False
    • Hide

      None

      Show
      None
    • False
    • CNV v4.18.0.rhel9-739
    • None

      We may want to change the volumeModes and accessModes for the destination volumes

      Two requests:

      1. By default, create a target DV without accessModes and volumeMode - let it pick the defaults from the storageProfile

        storage:
          resources:
            requests:
              storage: "34087042032"
          storageClassName: hostpath-csi-basic

      2. Still add an option to choose the accessModes and volumeMode and use the chosen values in the DV spec:

        storage:
          accessModes:
          - ReadWriteMany
          resources:
            requests:
              storage: "34087042032"
          storageClassName: hostpath-csi-basic
          volumeMode: Block 

       

      Additional info: 

      Faced the issue when was migrating from OCS to HPP, my destination DV was created with ReadWriteMany Block, which is not supported by the destination storage class:

      $ oc get dv fedora-amaranth-beetle-28-volume-mig-lncu9c -oyaml
      apiVersion: cdi.kubevirt.io/v1beta1
      kind: DataVolume
      metadata:
        annotations:
          cdi.kubevirt.io/storage.usePopulator: "true"
        creationTimestamp: "2025-01-15T10:05:29Z"
        generation: 1
        name: fedora-amaranth-beetle-28-volume-mig-lncu9c
        namespace: default
        ownerReferences:
        - apiVersion: kubevirt.io/v1
          blockOwnerDeletion: true
          controller: true
          kind: VirtualMachine
          name: fedora-amaranth-beetle-28
          uid: 43023353-6bc0-4e7b-b265-a59720d37b92
        resourceVersion: "12604148"
        uid: b01aae70-c014-4fb1-8f83-48efd4e30bb3
      spec:
        source:
          blank: {}
        storage:
          accessModes:
          - ReadWriteMany
          resources:
            requests:
              storage: "36071014400"
          storageClassName: hostpath-csi-pvc-block
          volumeMode: Block
      status:
        claimName: fedora-amaranth-beetle-28-volume-mig-lncu9c
        conditions:
        - lastHeartbeatTime: "2025-01-15T10:05:29Z"
          lastTransitionTime: "2025-01-15T10:05:29Z"
          message: PVC fedora-amaranth-beetle-28-volume-mig-lncu9c Pending
          reason: Pending
          status: "False"
          type: Bound
        - lastHeartbeatTime: "2025-01-15T10:05:29Z"
          lastTransitionTime: "2025-01-15T10:05:29Z"
          status: "False"
          type: Ready
        - lastHeartbeatTime: "2025-01-15T10:05:34Z"
          lastTransitionTime: "2025-01-15T10:05:29Z"
          reason: ContainerCreating
          status: "False"
          type: Running
        phase: PendingPopulation
        progress: N/A 

              upalatuc@redhat.com Ugo Palatucci
              jpeimer@redhat.com Jenia Peimer
              Guohua Ouyang Guohua Ouyang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: