Repairing a Smart failed drive in a zpool?

Status
Not open for further replies.

Seattle

Cadet
Joined
Oct 16, 2012
Messages
8
I want to keep this short and sweet so Ill just cut to the chase.
I'm working on this issue for a client. He setup FreeNAS 8 without my help.
He setup 4 drives in what looks like a Raidz0-1 setup. 2 of the drives have failed smart and the zpool is offline and faulted. (metadata corrupt)
He brought me the machine and it will not boot form his install at all. Just a kernel panic becauseit cant mount the MD1 ( not enough raid devices) obviuosly this seems hosed.
What I have done in the past is been able to DDRESCUE or RECOVERDISK the smart failed drives over to a new drive and then physically replace the drive and boot up and import the pool.
However, this isnt working this time. I am able to successfully run DDRESCUE and RECOVERDISK without any errors to new drives. When I check the partition table on the cloned drive, I can see all the correct partitions. But when I boot up and run zpool import to show the pool, it now shows the missing drive and the new cloned one isn't in list.
I am confused on how to force the zpool to use the new cloned drive.
I know there are commands that would allow me to add the new drive in with the cloned data and zpool would pick it up and use it, but these only work if the zpool is already imported.
Since I am working off a new FreeNAS 8 image on my flash drive in order to work with the pools, I have to import the zpool first. But it wont import because its missing the drive, but I cant add the drive because its not imported. Catch 22?

Any help here would be great. the smart failed drives are still 99% accessible and I am able to run DD without any error to get clones of them. I have 2 out of the 4 that I need to clone and add manually back into the pool to get it back up.
Actually, I only really need to get one working so I can get the pool in a degraded state to copy the data off for him.

Like I said, strange issue that seems simple to fix, maybe I just don't know the right order of commands.

thanks ahead of time.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
It sounds like the ZFS metadata that tells ZFS what pool, vdev, and device in particular it is. Without that information there's no way to convince the import command to do the import.
 
Status
Not open for further replies.
Top