]> git.proxmox.com Git - pve-installer.git/commit
prompt user if a vgrename is OK for exisiting 'pve'/'pmg' VGs
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 9 Jul 2019 19:52:37 +0000 (21:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 9 Jul 2019 19:52:41 +0000 (21:52 +0200)
commit4566af04f7e265316182c45fc73a1f25322b458a
treed9adbae42f0d743ce2bcc9e1f525260d562ef239
parenta346a962dbb3095009222d212c3f80f5580aa36f
prompt user if a vgrename is OK for exisiting 'pve'/'pmg' VGs

If one has a 'pve' VG on a disks not selected as install target
(e.g., on re-installation to different disk or if putting a used disk
into another server where PVE was installed on) the vgcreate call
errored out, as for creation the VG names must be unique.

Cope with that by asking the users if a rename to a
'<vgname>-OLD-<short-uid>' name is OK in this case. It ensures that
no data is lost and that we can safely continue with the
installation. The admin can then later on wipe the renamed VG if it
was really decommissioned or save data from it (or actually use it)

This can cope (tested) with:
* a single 'pve' VG on another device
* a single 'pve' VG spanning multiple devices
* multiple 'pve' VGs spanning different sets of devices

This is achieved by using the VG UUID for rename, and by recording
all PVs with said UUID as index.

Note, while this commit message talks mostly about 'pve' VG the patch
itself is actually agnostic of the specific name, works for 'pmg' and
possible (future) other VG names too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxinstall