> Public bug reported:
>
> In manual partitioning mode one may want to keep some partitions but
> throw away a VG, replacing it with a plain partition or with another VG
> built from scratch.
>
> Subiquity allows for deleting VGs, but this is not actually done. Even
> if the "deleted" VG disappears, another VG with the same name can't be
> created (the error is: "vg0 is not a valid name for a volume group").
>
Ah I know what causes this: you can't create a vg with a name that
already exists in /dev. And subiquity hasn't been taught that the install
might actually remove a device node... Or at least it should.
If
> the VG has been "deleted" from subiquity and a device which was in the
> VG is used in another way, the installation fails at format time with
> the error "device is in use".
>
This is another bug and at least possibly one in curtin although it's also
possible that we're generating a bogus config. Did you save the logs?
In both cases a look in /dev reveals the VG still exists.
>
> If a VG is deleted and not reused the installation does not fail, but
> the VG comes up configured in the installed system.
>
Hmm I guess we need to do something that will cause curtin to run
clear_holders on all the members of an LVM / RAID we delete.
On Sat, 20 Jul 2019, 02:02 Paride Legovini, <email address hidden>
wrote:
> Public bug reported:
>
> In manual partitioning mode one may want to keep some partitions but
> throw away a VG, replacing it with a plain partition or with another VG
> built from scratch.
>
> Subiquity allows for deleting VGs, but this is not actually done. Even
> if the "deleted" VG disappears, another VG with the same name can't be
> created (the error is: "vg0 is not a valid name for a volume group").
>
Ah I know what causes this: you can't create a vg with a name that
already exists in /dev. And subiquity hasn't been taught that the install
might actually remove a device node... Or at least it should.
If
> the VG has been "deleted" from subiquity and a device which was in the
> VG is used in another way, the installation fails at format time with
> the error "device is in use".
>
This is another bug and at least possibly one in curtin although it's also
possible that we're generating a bogus config. Did you save the logs?
In both cases a look in /dev reveals the VG still exists.
>
> If a VG is deleted and not reused the installation does not fail, but
> the VG comes up configured in the installed system.
>
Hmm I guess we need to do something that will cause curtin to run
clear_holders on all the members of an LVM / RAID we delete.
Cheers,
mwh
>