Pool degraded after replacing disk, new disk added as new vdev

Aphelion

Cadet
Joined
Nov 20, 2021
Messages
1
Hi all, I am trying to fix an issue I have on truenas storage happened after replacing a failed disk, currently the pool is in degraded status as per the below pool status output:

pool: nas1
state: DEGRADED
status: One or more devices has experienced an unrecoverable error. An
attempt was made to correct the error. Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
using 'zpool clear' or replace the device with 'zpool replace'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-9P
scan: scrub repaired 0B in 01:06:00 with 0 errors on Sun Oct 17 10:50:10 2021
config:

NAME STATE READ WRITE CKSUM
nas1 DEGRADED 0 0 0
raidz2-0 ONLINE 0 0 0
gptid/8ef4519d-b17c-11eb-b7e2-d4ae528dbb7e ONLINE 0 0 0
gptid/06732ffa-a69a-11eb-83d4-d4ae528dbb7e ONLINE 0 0 0
gptid/169562f6-9f8d-11eb-9c8a-d4ae528dbb7e ONLINE 0 0 0
gptid/16155c26-9f8d-11eb-9c8a-d4ae528dbb7e ONLINE 0 0 0
gptid/16dce22b-9f8d-11eb-9c8a-d4ae528dbb7e ONLINE 0 0 0
raidz2-1 ONLINE 0 0 0
gptid/54aedc98-b260-11eb-b7e2-d4ae528dbb7e ONLINE 0 0 0
gptid/57963c77-b260-11eb-b7e2-d4ae528dbb7e ONLINE 0 0 0
gptid/56c142f0-b260-11eb-b7e2-d4ae528dbb7e ONLINE 0 0 0
gptid/5b99c3da-b260-11eb-b7e2-d4ae528dbb7e ONLINE 0 0 0
gptid/5cee9c1d-b260-11eb-b7e2-d4ae528dbb7e ONLINE 0 0 0
gptid/5dea0e48-b260-11eb-b7e2-d4ae528dbb7e ONLINE 0 0 0
da1p2 DEGRADED 0 0 0 too many errors

errors: No known data errors

da1p2 was the replaced disk previously part of raidz2-0 vdev, now it's listed as separate vdev in degraded status.
I tried detaching that disk however I got error

cannot detach da1p2: only applicable to mirror and replacing vdevs

so I am unable to put the pool back online.

Any hints to fix the issue ? Thanks in advance for any feedback, much appreciated
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
You replaced the faulty drive incorrectly and have added it to the pool.
The only solution is to destroy the pool and rebuild it from your backup.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Please put code tags around your copy of the state so we can properly see the indentation. This is crucial to determine which belongs to which. Like so:
Code:
This
is
in
code
tags
  and
  indented
back to first column
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I tried detaching that disk however I got error

cannot detach da1p2: only applicable to mirror and replacing vdevs
That's unfortunate, but correct... you can only detach top-level VDEVs from a pool if it doesn't have any RAIDZ VDEVs... yours does.

How did the last disk fail? it looks odd (you didn't use code tags so we can't see the indentation to know if that's a member of the VDEV or not... so trusting what you put in the subject)

If it's a single disk VDEV, it shouldn't have done anything in terms of IO yet other than adding some basic pool metadata, so having failed is super-odd at this point if it wasn't DOA.

If you don't have a backup and you can't afford to lose some content, you may have some risky options available... export and import again with the -F switch, or using a tool like Klennet to get at your data (not a free tool, but you can at least see if it can recover anything before you must pay).

If you do have a backup, it's time to rebuild the pool and restore.
 
Top