ZFS Replace failed disk in ZFS Mirror

AndrewIOM

New Member


Messages: 1

Hi All,
Hope someone can guide me.
I created a zpool called data with 4 pairs of mirrored disks (8 disks in total) mirror-0 to mirror-3
A disk in mirror-0 failed I have been able to remove it from the mirror-0 and replace the disk.
This now shows as ada0 in zpool status with no mirror-0 showing.
How do I add the new disk into the mirror-0 pool?
Most of the guides I can find are dealing with a zroot and this is just a data pool.
Do I need to copy the disk partition from the first disk or just add the disk and ZFS resilvers to the new disk?

Andrew
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,024
Messages: 38,480

I created a zpool called data with 4 pairs of mirrored disks (8 disks in total) mirror-0 to mirror-3
A disk in mirror-0 failed I have been able to remove it from the mirror-0 and replace the disk.
Why did you remove it from the mirror? Just yank out the failing the drive (it's probably marked as FAILED or OFFLINE anyway) and use zpool-replace(8) to replace it with the new disk. Be absolutely sure to yank out the correct drive though, if you yank out the, still working, other side of the mirror the whole pool will die. Been there, done that, better make sure you don't repeat my mistake.

Most of the guides I can find are dealing with a zroot and this is just a data pool.
Why do you think the name of the pool matters in any way?

Do I need to copy the disk partition from the first disk or just add the disk and ZFS resilvers to the new disk?
That depends on how it was set up in the first place. If it used partitions on the failed disk, then yes. If not, then no.
 
Top