Archive for juin 15th, 2020
Proxmox – ZFS – Dead drive on active VM, recover from replicated disk
So you run a proxmox cluster, and you have 3 nodes.
Your VMs are all replicated, using ZFS replication, and in HA mode.
Each ZFS volume runs on a single drive, because we don’t have too much money, and it’s an home setup, OR, your RAID back end went nuts and you lost a full physical volume.
Issue is, your VM did not migrate through HA to another node, because obviously, the PVE node was not down, as only 1 of the ZFS drives died.
Then, I had major power outage, and a second one, ending after auto reboot, with some VMs on one node, some on another, and, this specific VM (my nextcloud), with a 1TB virtual disk, that was on the dead physical disk.
At this stage, I have a failed VM, on an active node, without valid disk for the VM, BUT, thanks to the cluster, I still see with « zfs list » on the other nodes, that the replicated copies are still here !
So here are the steps, finally easier and faster than expected :
Move the VM manually in another node of the cluster, and this is very simple, as SSH with a shell on any PVE nodes :
mv /etc/pve/nodes/pve1/qemu-server/106.conf /etc/pve/nodes/pve6/qemu-server/
Now, you did it, refresh the web interface, and the VM is now back on the node that has a valid disk for your VM ! …but it won’t start because it was in failed state at HA level. Not an issue, on the VM, menu « more », manage HA, and set it to « disabled », validate. Then again, in the menu, set it to « started ».
VM should start again, using the replica of the disk !
Now, on the node that had the failed disk, I have SATA drives, I just hot unplugged the dead unit, and put a new disk.
Initiate the new disk as GPT, and we’ll need to add it to ZFS. Issue is, volume already exists. So we need to go to « datacenter » then « storage », double click on the needed ZFS Pool, and uncheck the node that had the failed drive.
Validate, and go add the disk on the node, in ZFS, with the same ZFS Pool name.
Now you have valid new ZFS volume.
Make sure your run the replication from the currently running node, to this empty volume !!! So has you have the data replicated again.
I was a bit stressed, even if I have backup on another machine at filesystem level with backuppc of my VM content, it’s always much much much more easy and quick to get the existing VM back on track.
I hope it will help you. I realized at least how easy and simple it is to move a VM that is not running from one host to another.
Have a great day, and go to hell power outage and dead drives ! (Yes I have UPS, surge protection… still).
![]()
Pages
- À propos
- Alexandre Blanc Experience or work background
- Connected=hacked, cloud=leak, why
- Keeping track for my speaking events / appearances
- My take on Zero Trust – SP 800-207
- Openvpn and pihole on OVH VPS Server FAQ
- Raspberry 3 router project FAQ
- Spotting LinkedIn fake profiles, the tail of industrial spying, should I trust this contact ?
Search this Site
Archive
- août 2026
- avril 2025
- juin 2024
- mai 2024
- mars 2024
- février 2022
- janvier 2022
- octobre 2021
- septembre 2021
- mai 2021
- octobre 2020
- juin 2020
- avril 2020
- avril 2019
- janvier 2019
- juin 2018
- mars 2017
- octobre 2016
- août 2016
- mai 2016
- septembre 2015
- mai 2015
- février 2015
- novembre 2014
- septembre 2014
- août 2014
- janvier 2013
- décembre 2012
- juillet 2012
- janvier 2012
- novembre 2011
- octobre 2011
- mai 2011
- avril 2011
- mars 2011
- février 2011
- janvier 2011
- décembre 2010
- novembre 2010
- octobre 2010
- septembre 2010