How to recover rpool when PVE boots to initramfs?

swobi

New Member
Mar 13, 2025
1
0
1
I had a failed drive hence ZFS rpool went into degraded state, after replacing the drive, I made a mistake by running sgdisk --replicate=/dev/sda /dev/sdc followed by a reboot (messed up the order with sda as the healthy bootable disk and sdc the new disk).
Now PVE boots to initramfs with rpool not found, is there a way to recover this? or did I wipe out the healthy disk as well?
 

Attachments

  • boot.JPG
    boot.JPG
    7.4 KB · Views: 5
  • initramfs.JPG
    initramfs.JPG
    90 KB · Views: 5
Last edited:
Hope you have a backup. It's best not to type commands like that blindly without a reference.

My advice is reinstall PVE and restore LXC/VMs from backup
 
You should also have used -G, but is the old disk partition table still readable and identical, if so copy it from there. Technically the data is still there, but recovering the partition table will be complicated. sgdisk can read/write the table to file, that makes your intentions much clearer if you are scripting, or use the interactive gdisk
 
Last edited: