How to fix degraded pool?

NavyLCDR

Dabbler
Joined
Jul 17, 2019
Messages
26
HELP! How do I fix this? I had a hard drive physically fail. The SATA connection at the hard drive physically broke so I cannot attach a SATA cable to it. Will the SPARE drive automatically resilver into the second Mirror VDEV?

Capture.jpg


Thank you!
Very Respectfully,
John
 
Joined
Oct 18, 2018
Messages
969
Hi John, yes, the spare drive will automatically replace the degraded drive. Check out the User Guide on the subject, it should clarify.

That spare drive is what is often referred to as a "hot" spare. It is a "hot" spare because it is plugged in and on and ready to replace a failed drive when necessary. This sounds great and well and good but there is a catch; it will only replace a drive when it has outright failed. The spare will not replace an about-to-fail drive.

What many of us choose to do is avoid using hot spares and instead use cold spares. A cold spare is a drive which has been through the burn in process and is known good. For example, on my cold spares I run a long smart self test followed by badblocks followed by one more long smart self test. We then set up scheduled short and long self tests as well as pool scrubs. Together these can tell us that a drive is about to fail before it outright fails so we can replace the failing drive with a cold spare right away.

This has a few advantages; first it saves you a drive bay. Also, it can provide a bit of protection against data loss since you're replacing a drive before it has outright failed if something goes wrong during resilver you _may_ be able to use the original drive to recover from. Anyway; I say this just to give you something to think about. There isn't anything wrong with your setup. If you don't already have them; you should configure regular short and long SMART tests and scrubs.
 

NavyLCDR

Dabbler
Joined
Jul 17, 2019
Messages
26
Thank you for the prompt answer! So, how do I fix below? I want to get back to two mirror VDEVS striped to regain the redundancy, but if I am seeing the below status correctly, I have 1 mirror VDEV striped to a single disk, and if I lose that single disk, I lose the entire pool. How do I attach a second drive to the single drive to make it a mirror VDEV again? Thank you!

Capture.jpg
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Did you move cables around? Nothing wrong with that, it’ll work, just curious because: it looks like you are missing a disk. Can you see it under disks? Is it powered and cabled?
 

NavyLCDR

Dabbler
Joined
Jul 17, 2019
Messages
26
I have 2 disks that are showing unused under the list of disks. I've got 5 total connected via motherboard sata ports.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Assuming those don't hold data - which I don't know, you would - you should be able to "attach" one of them to unmirrored disk, creating a mirror. However, a caveat: I haven't done this, gptid's are to be considered, and you definitely do not want to "add", as that would just get you further down the road of a pool without redundancy.

zpool attach Pool1 gptid/currentdisk gptid/newdisk is how to attach, glabel status is how to find the gptid and match it to ada1p2.

Don't use the GUI CLI to make changes, use SSH. And, I'd think you'd want someone along in this thread who's actually done this.
How you lost that drive out of redundancy is a good question. Does zpool status also show a single disk for that second vdev?
 

NavyLCDR

Dabbler
Joined
Jul 17, 2019
Messages
26
Yes, zpool status shows a single disk for the second vdev. How do I find the gptid of one of the disks that are unused? That's what has kept me from attempting to use the attach command. I can't find the gptid for the unused disk.
 

NavyLCDR

Dabbler
Joined
Jul 17, 2019
Messages
26
Assuming those don't hold data - which I don't know, you would - you should be able to "attach" one of them to unmirrored disk, creating a mirror. However, a caveat: I haven't done this, gptid's are to be considered, and you definitely do not want to "add", as that would just get you further down the road of a pool without redundancy.

zpool attach Pool1 gptid/currentdisk gptid/newdisk is how to attach, glabel status is how to find the gptid and match it to ada1p2.

Don't use the GUI CLI to make changes, use SSH. And, I'd think you'd want someone along in this thread who's actually done this.
How you lost that drive out of redundancy is a good question. Does zpool status also show a single disk for that second vdev?

YAY! The attach command worked! I found the gptid of the unused drive with the glabel list command. AWESOME!
 
Top