Reinstall without wiping LVM-Thin pool

Faris Raouf

Well-Known Member
Mar 19, 2018
147
26
58
In the event of an OS or Proxmox software disaster -- for example an update that goes wrong, or accidental deletion of system files, or some other serious problem that cannot be resolved easily or prevents the system from booting or similar, can someone please tell me if there is a way to re-install Proxmox from scratch, without destroying the "pve" VG, or losing the content of the LVM-Thin "data" pool, which is where all my VM disks are located?

I do not use CEPH or ZFS -- I have just two nodes in a cluster, each with local storage configured as per the installation defaults: a Volume Group "pve" which has LVs of "root", "swap" and the all important "data" (LVM-Thin pool), and various VM disks which show up as LVs that use the "data" pool.

Ideally I don't want to "wipe" the "pve" VG, and don't want to touch the "data" Thin pool. I just want the OS/Proxmox software reinstalled, somehow. The "root" LV could be wiped if need be - there's nothing there that I would miss - the VM config files and cluster config can easily be recreated.

I came across an old 2013 post https://forum.proxmox.com/threads/reinstall-proxmox-without-format.26221/ but this doesn't really help me, and I am rather hoping now that we are in 2019 that there must be an easier way to re-install that trying to install Debian and then installing Proxmox on top, or somehow moving the VM disk LVs from the "data" pool to another disk, wiping it all, re-installing, then moving the VM disks back. The disk copying alone could take half a day due to the huge volume of data involved.

Any suggestions would be very much appreciated.
 
Hi,

this post is from 2016 but the way is the same.
The Proxmox installer has no reinstall capability.
 
I am disappointed to hear this.

I would have thought a "repair" or "re-install" would be a very useful option to have.

I do not know the complexities involved with installers, but if it is a simple thing to implement, please can it be added?

I am horrified at the idea of probably losing my data, even though it was safe and sound, in order to restore a broken node.

In the meantime, maybe someone with the required knowledge and skill set could come up with a series of disaster recovery HOWTOs for some common scenarios?

Maybe we can start with how to move a disk from lvm-thin from the command line using qm move_disk? [ if necessary with a warning of the requirement of adding a suitable "storage" in /etc/pve/storage.cfg that can hold disk images? I know you need to do this to move a disk via the GUI, but I don't know if it is needed for qm move_disk ]. Or maybe using "dd" is better?
 
Proxmox is designed to be a clustered environment. As all relevant data is contained within the cluster there is little reason to ever do a repair install on a node; moreover, reinstalling on top of an active cluster node can have catastrophic consequences to the whole cluster.

But I digress. if you dont want to redo your LVM, what is the purpose of the reinstallation? easiest thing to do is remove the storagepoint from proxmox and readd it as LVM (not thin.)

Maybe we can start with how to move a disk
moving a disk can be done through the GUI:

upload_2019-2-26_9-37-39.png
 
Well, Proxmox *supports* a clustered environment, but does not *require* it. Many of us do not use it to the full extent of its ability.

Many users only use local storage and may or may not have a cluster of a small number of nodes, mainly for ease of management rather than storage sharing.

In my disaster scenario, I do not imagine the GUI to be working, hence wanting to use the CLI for everything. If the GUI is working, yes, it is easy to move a disk and things are so much easier, but it is a good idea to assume that it is not.

But I digress. if you dont want to redo your LVM, what is the purpose of the reinstallation? easiest thing to do is remove the storagepoint from proxmox and readd it as LVM (not thin.)

I'm afraid that I don't understand what you are asking/telling me here :-(

I want a reinstall to write whatever a fresh install normally writes in terms of OS and/or Proxmox files and for the system to be made bootable, just as it would for a fresh install. Surely this can be done without first destroying the pve VG and data LV? Basically I want to end up with Proxmox, fresh out of the box, but with anything that was in the data LV ["local-lvm" storage in Proxmox] to remain untouched.

Forgive my ignorance, but I am not clear on what removing the local-lvm storage from proxmox and re-adding it as non-thin LVM would do to help? Will removing it not cause the loss of the disks stored in it?
 
In my disaster scenario, I do not imagine the GUI to be working, hence wanting to use the CLI for everything. If the GUI is working, yes, it is easy to move a disk and things are so much easier, but it is a good idea to assume that it is not.
fair enough. the GUI is just a service that opens access to the proxmox api in a graphical fashion; all its functionality is available through the api engine through cli as well. see man pvesh

I want a reinstall to write whatever a fresh install normally writes in terms of OS and/or Proxmox files and for the system to be made bootable, just as it would for a fresh install. Surely this can be done without first destroying the pve VG and data LV?
Its possible; install debian in manual mode, and then install proxmox as described here: https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Stretch

The point I'm trying to make is that it is not necessary, in virtually all circumstances. if your system is functioning and you're not trying to make any changes to it, what is the purpose of reinstallation in the manner you describe? If it is non bootable or broken in some way, you may always repair it as you would any other linux system (debian specific instructions: https://www.debian.org/releases/stable/amd64/ch08s07.html.en) Lastly, you would not normally use the same disk to run the hypervisor AND data since there are performance implications. Ideally your data volume does not share the same disks.

Forgive my ignorance, but I am not clear on what removing the local-lvm storage from proxmox and re-adding it as non-thin LVM would do to help? Will removing it not cause the loss of the disks stored in it?

It was my understanding that you wanted to switch your pool to standard LVM and not thin provisioned; I think I misread your request :) removing a dataset from proxmox doesnt destroy it, it simply removes it from proxmox's ability to deploy to it.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!