Hot Spare still in use after replaced disk (cannot free up the hot spare)

Bill Calkins

Cadet
Joined
Dec 24, 2019
Messages
2
I have a 6 disk raidZ1 with a hot spare. da0-da5 , da10 is the hot spare
da4 failed and da10 (spare) kicked in and took over.
I added a new disk to an empty slot and it's da11. I offlined bad disk da4. I replaced da4 with da11 The pool is resilvered, state online
My spare is still in use in the pool and the spare is labelled INUSE

pool: data
state: ONLINE
scan: resilvered 1.73M in 00:00:01 with 0 errors on Tue Jan 5 19:29:42 2021
config:

NAME STATE READ WRITE CKSUM
data ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
gptid/65099799-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
gptid/68665204-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
gptid/6af6daef-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
gptid/6d70b680-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
gptid/6f7b02d6-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
spare-5 ONLINE 0 0 81
gptid/e67158ae-4b95-11eb-8bde-4cd98fb8f3f4 ONLINE 0 0 0 ->new da11
gptid/2511dac0-42c7-11eb-8bde-4cd98fb8f3f4 ONLINE 0 0 0 -> spare
logs
gptid/6a10d45b-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
cache
gptid/674b39c1-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
spares
gptid/2511dac0-42c7-11eb-8bde-4cd98fb8f3f4 INUSE currently in use

How do I get my spare out of the pool and back in the AVAIL state? I offlined it but the pool goes into degraded state. I tried offline/detach- but it gives an error
The UI still shows the pool as a 6 disk pool, but it's using 7 good drives.

Note: Attachment it what the pool looked like before I replaced the disk. I also go through the steps I performed.
 

Attachments

  • Bad Disk Dec 2020 TrueNAS.pdf
    232.5 KB · Views: 245

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
zpool detach data gptid/2511dac0-42c7-11eb-8bde-4cd98fb8f3f4 should do it.
 

Bill Calkins

Cadet
Joined
Dec 24, 2019
Messages
2
That worked! Thank you sretalla!

As I stated, I offlined then detach but that gave me python errors. However, I did do it in the UI, so maybe that's why. But simply detaching and giving the full gptid worked. Maybe it was doing it from the CLI and giving the full ID name that worked.

truenas% sudo zpool detach data gptid/2511dac0-42c7-11eb-8bde-4cd98fb8f3f4


truenas% zpool status
pool: boot-pool
state: ONLINE
scan: scrub repaired 0B in 00:01:35 with 0 errors on Wed Jan 6 03:46:35 2021
config:

NAME STATE READ WRITE CKSUM
boot-pool ONLINE 0 0 0
da9p2 ONLINE 0 0 0

errors: No known data errors

pool: data
state: ONLINE
scan: resilvered 1.58M in 00:00:01 with 0 errors on Tue Jan 5 19:53:39 2021
config:

NAME STATE READ WRITE CKSUM
data ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
gptid/65099799-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
gptid/68665204-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
gptid/6af6daef-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
gptid/6d70b680-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
gptid/6f7b02d6-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
gptid/e67158ae-4b95-11eb-8bde-4cd98fb8f3f4 ONLINE 0 0 0
logs
gptid/6a10d45b-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
cache
gptid/674b39c1-09a6-11eb-8ead-4cd98fb8f3f4 ONLINE 0 0 0
spares
gptid/2511dac0-42c7-11eb-8bde-4cd98fb8f3f4 AVAIL -<now shows online!

errors: No known data errors
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I haven't seen any evidence that convinces me that the GUI is well equipped to handle anything after adding the spare to the pool... I have only seen success from the CLI with "returning to normal" (a few different versions of what "normal" might be).
 
Last edited:

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Joined
May 2, 2017
Messages
211
Top