curtin fails to recreate existing logical volumes

Bug #1965290 reported by frukto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
New
Undecided
Unassigned

Bug Description

curtin fails to recreate existing logical volumes. If a logical volume already exist and is configured with "preserve: false" it should be deleted and then (re-)created.

Now curtin tries to create the volume and fails because a logical volume with this name already exists.

See "lvm_partition_handler" in https://github.com/canonical/curtin/blob/master/curtin/commands/block_meta.py

Use case, keep only some logical volumes, but others not:

    - type: lvm_partition
      id: lv_01
      name: lv_01
      volgroup: vg_01
      size: 1024M
      preserve: true

    - type: lvm_partition
      id: lv_02
      name: lv_02
      volgroup: vg_01
      size: 1024M
      preserve: false

All "underlying" objects (disks, partitions, volume groups) need "preserve: true" and "wipe: false" (i.e unset). So all present logical volumes will be visible to curtin.

Tags: lvm
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.