"Untangling" VDEV, SPARES and Spares After Disk Failure

CompuLen

Cadet
Joined
Nov 4, 2015
Messages
7
Hi All,

I would be very grateful on your help with the following.

On the system in question I have one pool named storage0.

This pool has one raidz2 vdev, which is/was 5 disks wide and has/had 2 hot spares. I'd like to return it to a state 5 disk raidz2 with 2 hot spares, while hopefully not having to rebuild the pool from scratch.

What preceded the current state was a failed drive and the pool being degraded. After replacing a failed drive and letting the resilvering process finish, I now have a configuration of drives in this pool, which I'm not quite sure what to make of (see screenshots). I mistakenly added couple of extra drives to hot spares, but am now not seeing an option of removing them from the pool.

The confusion is as follows:
  • The vdev now seems to be 4 disks wide, but is reported as being 5 wide
  • There are two separate sections listing Spares and the other SPARES
  • One of the drives sdh appears in both of these sections


1690990836020.png





1690990948725.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
you should be able to return your spare to the spares list with:

zpool detach storage0 b8068168-36fe-4064-838c-907456325e0

The vdev now seems to be 4 disks wide, but is reported as being 5 wide
No, it's 5 wide, one disk is spared, so you see it as such.

There are two separate sections listing Spares and the other SPARES
Normal when a disk is spared

One of the drives sdh appears in both of these sections
Because it's the spare currently used.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Also...

has/had 2 hot spares
You appear to have 4 spares. That's an unusual number for a pool of only 5 disks in the first place.

You can remove (some or all of) those with zpool remove.
 

CompuLen

Cadet
Joined
Nov 4, 2015
Messages
7
Also...


You appear to have 4 spares. That's an unusual number for a pool of only 5 disks in the first place.

You can remove (some or all of) those with zpool remove.

Thank you so much @sretalla ! That makes sense. Looks like I am on my way to squaring it all away, once the resilvering completes.

As for the number of spares (4), they are drives I mistakenly added to the pool. They just live in that box for future use. Removing 3 of them from this pool cleaned things up. As I wasn't given an option do it from the GUI and had to use it through cli command you mentioned, it partially led to my confusion. Anyhow, all's good now.

Once more, I appreciate you pointing me in the right direction!
 
Top