Change discs without losing configuration

M.R

Member
Aug 23, 2019
8
0
6
46
Hello, I am having problems with a Proxmox version 5 server, I think there are some bad sectors on the sda disk where it is installed.
My environment is as follows, an HP Server with Proxmox v5 installed on the sda disk, 6 virtual machines distributed on other disks (sdb and sdc)
I would like to replace the sda disk, that is, replace it with a new one with a fresh installation and recover the previous configuration again.
I can't backup and restore VMs because it would take me too long.
Is there any way to perform this process? Remove the damaged disk, place a new one, install proxmox and recover the VMs from the other disks?
Thanks
 
hi,

yes indeed you can do this but there will be some downtime while switching the disks (unless you have a cluster with 3+ nodes in which case you can live-migrate the VMs to another node while that happens)

6 virtual machines distributed on other disks (sdb and sdc)
that's good so you won't have to touch the VMs

firstly take a backup of /etc/pve folder somewhere. this holds all your PVE-related configurations like storage, VM/CT configs etc.

if you have a cluster, make a backup of corosync related configurations.

other files of interest:
- /etc/hosts
- /etc/network/interfaces

and other stuff you configured by yourself.

after you have a backup of all your configurations; take your host down (live-migrate VMs if you have another host to avoid downtime)
switch the disks and reinstall proxmox (don't touch sdb or sdc during this phase) then replace the configurations from your backup on the new disk.

also i suggest you use the opportunity to install the latest 6.x for that node so you can get the latest bugfixes and new cool features

hope this helps
 

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!