Comment 0 for bug 1873328

Revision history for this message
Paride Legovini (paride) wrote :

[Bug spun-off from LP: #1837214]

When installing on a disk which already has a LVM VG on it, the VG can't be deleted and recreated with the same name. The error is: "vg0 is not a valid name for a volume group" in the case of vg0.

This happens because in lvm.py subiquity checks if the new VM name already exists in /dev:

if v in ('.', '..', 'md') or os.path.exists('/dev/' + v):
    return _("{} is not a valid name for a volume group")

I understand (took me a while) why the check is there: we don't want the user to name the VG as an existing device, like "tty1" or "zero". We should find a way to exclude volume groups from this check. The check in duplicate VG names is done already:

if v in self.vg_names:
    return _("There is already a volume group named '{}'")

so excluding them from the check shouldn't cause problems.