Spare of raidz2!!!Spare of raidz2!!!Spare of raidz2!!!

dengruxi

Dabbler
Joined
Mar 12, 2020
Messages
32
Raidz2 after the hard disk of DA2 broke down, I replaced DA2 with a new hard disk, and the system still summarized DA2 into spare. Is my display normal?
QQ20220429-214502@2x.png

root@fuwuqi[~]# zpool status -v

pool: facai

state: ONLINE

scan: resilvered 5.05T in 12:36:18 with 0 errors on Tue Apr 26 01:07:49 2022

config:



NAME STATE READ WRITE CKSUM

facai ONLINE 0 0 0

raidz2-0 ONLINE 0 0 0

gptid/76246561-683e-11eb-a8c5-90e2ba6da54d ONLINE 0 0 0

gptid/d1b142d3-3839-11eb-88ec-90e2ba6da54d ONLINE 0 0 0

gptid/db7620cd-f8b9-11ea-9e5c-90e2ba6da54d ONLINE 0 0 0

gptid/c6cb9e50-2d41-11eb-bba9-90e2ba6da54d ONLINE 0 0 0

spare-4 ONLINE 0 0 0

gptid/94475535-c450-11ec-9103-90e2ba6da54d ONLINE 0 0 0

gptid/c3abab87-564c-11ec-93b2-90e2ba6da54d ONLINE 0 0 0

gptid/20b3cbd6-4028-11eb-9af6-90e2ba6da54d ONLINE 0 0 0

spares

gptid/c3abab87-564c-11ec-93b2-90e2ba6da54d INUSE currently in use



errors: No known data errors
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Is my display normal?
Normal, but requires action to return to "business as usual".

After a spare is activated, there are 2 options to complete the recovery...

Replace the broken disk with the spare (automatic) permanently and replace the spare with a new disk, detaching the broken disk from the pool.

or

Replace the broken disk with a new disk (what you have done already) and then return the spare to its role as a spare (the part you have not yet done).

Because the choice between those 2 options is a human thing, you must intervene to make one of them happen.

Since you chose the second option (or it seems you did that by default), whatyou now need to do is run:

zpool detach facai gptid/c3abab87-564c-11ec-93b2-90e2ba6da54d

That command will remove the spare-4 situation and will return the spare disk to the online (waiting to be used) section.
 

dengruxi

Dabbler
Joined
Mar 12, 2020
Messages
32
正常,但需要采取行动才能恢复“一切照旧”。
非常感谢您的帮助。现在看来一切都正常了!想请问如果之前没有按照您的操作热备是不是就不行了?后果是什么?谢谢你!
1651804643268.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I would like to ask if the hot backup will not work if you have not followed your operation before? What are the consequences?
If the spare is already "in use" in the pool and is showing as UNAVAIL in the spare section, it will not be able to replace another failed disk.

Only after running the command is the disk returned to be ready to act as a spare for the next failure.
 
Top