steps to swap out the only drive on a PVE host

rtcb

New Member
Oct 22, 2025
7
1
3
Hi there.
I've tried searching for what I thought would be a fairly common procedure but can only find hints of info.

I'm trying to work out the steps to swap out a failing drive on a PVE host in a homelab.
-it's a single PVE host, not a cluster.
-drive to be replaced is the boot drive and there is no mirror.
-host is running and bootable so data is retrievable.

All other drives are passed through to a NAS VM
I am guessing that it should be possible to somehow backup the PVE config and the VM images and restore them into a fresh install on the new drive?
Is there a step by step howto somewhere to do this?
Or any other suggested way? I could probably set up some temporary SATA storage on the host if that would help....


Cheers!
 
Setup PBS on separate hardware to take advantage of dedup, backup all LXC/VMs to it.

https://github.com/kneutron/ansitest/tree/master/proxmox

Look into the bkpcrit script, point it to external disk / NAS, run it nightly in cron.

After you have everything backed up, clonezilla from rescue environment (nothing mounted live) or look into Relax and Recover (REAR) which can recreate the LVM layout
 
  • Like
Reactions: rtcb and UdoB
You see..., there are completely different (but valid) ideas, depending on who you ask - and that's a good thing! :-)

My own version is to use the good old dd. Or most of the time its more featured bigger brother ddrescue. For operations like yours I like to keep it simple.

Please follow @Kingneutron's advice and make sure to have some restorable backup first - for both configuration data and the PVE datasets.
 
  • Like
Reactions: Kingneutron
Thanks all for the ideas, I will look into them and see how I get on.

Previously I was swapping in and out old/new SSDs so I have the current install as a backup on it's own SSD.
I had tried backing up the VMs and copying them and restoring... That seemed to co fine.
And I had tried copying over /etc/pve and even /etc but that seemed to not be a complete config restore of the PVE...

I just wish there was a PVE config export and import option....
 
  • Like
Reactions: Kingneutron
Setup PBS on separate hardware to take advantage of dedup, backup all LXC/VMs to it.

https://github.com/kneutron/ansitest/tree/master/proxmox

Look into the bkpcrit script, point it to external disk / NAS, run it nightly in cron.

After you have everything backed up, clonezilla from rescue environment (nothing mounted live) or look into Relax and Recover (REAR) which can recreate the LVM layout

Can I ask you a random unrelated question? hope any mods don't mind....
I noticed on your github you have a load of stuff. seems to be looks of solutions to things you encountered over time.
There is a winstuff and some iscsi stuff under there.
Did you ever encounter the issue in windows where during boot up a dummy NIC with random MAC is temporarily created to poll the network for iscsi targets (or something along those lines) and if so did you ever solve it?
 
> Did you ever encounter the issue in windows where during boot up a dummy NIC with random MAC is temporarily created to poll the network for iscsi targets (or something along those lines) and if so did you ever solve it?

I have not; barely use Windows anymore at all except for work, a VM for testing and (recently) Steam gaming. Thanks for noticing the code tho :)