Recovering my Zpool

path

Dabbler
Joined
Jul 5, 2013
Messages
46
I have a zpool on my older machine (truenas core) which is composed of two mirrored vdevs. I recently built a new computer and decided to install truenas scale on it and when testing it out, I moved one disk over from each vdev to the new machine to make I could see all my data and setup all the other software I would expect. Post this, I moved the other two disks over.

Now my problem is on my new machine it shows me that I have a degraded pool because two disks are offline. However, it recognizes all 4 disks. How do I recover from this and tell it that the two missing disks are actually here?
Code:
zpool status
pool: pool1
state: DEGRADED
status: One or more devices could not be used because the label is missing or
   invalid.  Sufficient replicas exist for the pool to continue functioning in a
   degraded state.
action: Replace the device using 'zpool replace'.
config:
    NAME                                      STATE     READ WRITE CKSUM
    pool1                                     DEGRADED     0     0     0
      mirror-0                                DEGRADED     0     0     0
62485734-3cbb-11e9-8387-d05099c28241  ONLINE       0     0     0
17690392454515062359                  UNAVAIL      0     0     0  was /dev/gptid/630dd369-3cbb-11e9-8387-d05099c28241
      mirror-1                                DEGRADED     0     0     0
63febaf2-3cbb-11e9-8387-d05099c28241  ONLINE       0     0     0
5933884306070000757                   UNAVAIL      0     0     0  was /dev/gptid/64d7bf2f-3cbb-11e9-8387-d05099c28241



Screen Shot 2022-01-19 at 10.41.03.png
 
Last edited:

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
What you probably should have done, is zpool split POOL {device device}.

Now you just replace the degraded disk slots with the disks that are not functioning. It's possibly you may have to wipe the 2 non-functioning disks. But, be careful not to wipe the functioning disks.

In theory, you may be able to export the pool and re-import it, (with all 4 disks connected). ZFS may then roll the changes forward on the 2 previously missing disks. But, you've strayed off the normal procedure path, so I don't know for sure.
 

path

Dabbler
Joined
Jul 5, 2013
Messages
46
What you probably should have done, is zpool split POOL {device device}.

Now you just replace the degraded disk slots with the disks that are not functioning. It's possibly you may have to wipe the 2 non-functioning disks. But, be careful not to wipe the functioning disks.

In theory, you may be able to export the pool and re-import it, (with all 4 disks connected). ZFS may then roll the changes forward on the 2 previously missing disks. But, you've strayed off the normal procedure path, so I don't know for sure.
Hi @Arwen thanks for the response. So here's my question. When I move the disks back to my old machine, it shows me that all the disks belong to the same pool. Is there a way for me to move the disks back, export the pool and then import it correctly?
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
I am not sure. As I said, you've strayed off the normal path. Perhaps someone else can answer your question.
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
When I move the disks back to my old machine, it shows me that all the disks belong to the same pool. Is there a way for me to move the disks back, export the pool and then import it correctly?
Can you see all the desired data from your SCALE installation where you showed the output in the first post?
If the current goal is to consolidate all drives into the SCALE machine I'd do the following.

I'd go ahead and try wipe the two drives that were "late comers" from the previous pool.
This can be done in the GUI.
Then I'd attach them, ie, "replace" the missing drive with each wiped drive.

This should be doable, but from experience, it might take some additional "convincing" to happen. (recognized drives, or with a current ZFS system on them acts as 'safety nets' to not nuke something you dont want to nuke)

If not, if you still have the CORE system available, and it is a possibility to destroy the pool off the two trouble some "last migrated drives", wipe them - then they should be easy to use for replacing in the new system.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
When I move the disks back to my old machine, it shows me that all the disks belong to the same pool. Is there a way for me to move the disks back, export the pool and then import it correctly?
The pool GUID is the same, but what has most likely happened based on what you did is that the last applied txg (transaction group) on each of the two "halves" of the pool are different (as the halves were both active at the same time in different systems).

The only way to correct it without data loss is as indicated... carefully wipe one "half" and resilver those disks back into the other half.
 
Top