ZFS Disk replacement

In my case I've got RAID1 (zfs mirroring) setup on 2x 4TB HDD - one of them start dying, loose data and have some broken sectors and require replacement.

1. I've detach old, broken one HDD and add new, empty one
2. My accident - copied partition table from new (empty) drive to current healthy one and lost data
3. Detach new one, attach old (dying) and copy partition tables back (so I've got m data back)
4. Replace HDD once again and resyc raid again - this time in correct direction (so from my working drive to new one ;) )

On the end - I've got all my data back and RAID rebuild.
 
  • Like
Reactions: joy123
Thank you very much. I have same setup as yours except my 2nd hdd is already degraded(so no data). I had to order a replacement for 2nd one which is new.


In my case, I am thinking to:
1. Same as you.
2. Same as you.
3. I am thinking to manually edit partition for new disk using fdisk and copy the partition table from current drive ,using one of your link.
4. Than continue with replacement procedure as the first post, zfs replace with old bad drive and sync the data to new drive as the first post.

Hoping to have the new drive all working before take down the current healthy one. I am not sure if that will work. All hdd is hot swappable, so I don't need to reboot my server.

Thanks again for your help, you are a legend.
 
Almost ;) To be sure, I will recomanded also a scrub:

zpool scrub [your-pool-name]
... and in the first out-of-work hourst, I also run this:

smartctl -t long /dev/sdX
X= the new replacement disk

The recovery steps are OK!
hi @guletz , i'm doing procedure written by @qgrasso but step 5 return me this error : " grub-install is disabled because this system is booted via proxmox-boot-tool, if you really need to run it, run /usr/sbin/grub-install.real "
and if i do that, another error appear : " Installing for x86_64-efi platform.
grub-install.real: error: cannot find EFI directory."

any idea ?
it is only lab test for me, no problems in production ;)
 
hi @guletz , i'm doing procedure written by @qgrasso but step 5 return me this error : " grub-install is disabled because this system is booted via proxmox-boot-tool, if you really need to run it, run /usr/sbin/grub-install.real "
and if i do that, another error appear : " Installing for x86_64-efi platform.
grub-install.real: error: cannot find EFI directory."

any idea ?
it is only lab test for me, no problems in production ;)

try running

Code:
pve-efiboot-tool format /dev/sde2 --force
 pve-efiboot-tool init /dev/sde2 --force

pve-efiboot-tool refresh
 
  • Like
Reactions: xigloo

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!