How to Restore Disconnected Pool that had Deleted Configuration

tpdinh

Dabbler
Joined
Dec 16, 2011
Messages
15
Hi,

Is there a way to restore a disconnected pool in which the option "delete configuration of shares" was checked? When I try to import the pool, my old pool doesn't show up. I did not check "destroy data on this pool" so I believe the data is still there?!

Thanks in advance.
 
Joined
Oct 18, 2018
Messages
969
Hi @tpdinh. Many folks would be happy to help but it is nice if you take a look at the Forum Guidelines and include more details about your system. Telling us exact model numbers for all hardware (even stuff you think may not be relevant), FreeNAS version, etc helps us better know your problem and helps prevent a lot of back and forth asking for further details. Fee free to edit your above post with that information. :)

"delete configuration of shares" was checked
My understanding of this operation is that it doesn't affect the data on the disks but affects the FreeNAS shares configuration involving that pool. Someone will correct me if I am wrong.

When I try to import the pool, my old pool doesn't show up.
This might suggest an issue with your pools however.

Here are some steps I'd start with to try to diagnose.
  • Please provide the specific system information I mentioned above and that which is mentioned in the Forum Guidelines
  • What is the output of zpool import
  • What is the current pool layout via zpool status
  • Exactly how many disks you have installed in the system?
  • Can you get any output from systemctl -i /dev/{device} for each disk you have in the system, especially the ones a part of the pool you're trying to import?
  • Are you trying to import the pool from the same system you removed it from?
 

tpdinh

Dabbler
Joined
Dec 16, 2011
Messages
15
Sorry, in my haste to try and fix the problem, I didn't read the forum guidelines. I'll do that once I get home and post and update to your questions.

Thanks!
 

tpdinh

Dabbler
Joined
Dec 16, 2011
Messages
15
Hi @tpdinh. Many folks would be happy to help but it is nice if you take a look at the Forum Guidelines and include more details about your system. Telling us exact model numbers for all hardware (even stuff you think may not be relevant), FreeNAS version, etc helps us better know your problem and helps prevent a lot of back and forth asking for further details. Fee free to edit your above post with that information. :)


My understanding of this operation is that it doesn't affect the data on the disks but affects the FreeNAS shares configuration involving that pool. Someone will correct me if I am wrong.


This might suggest an issue with your pools however.

Here are some steps I'd start with to try to diagnose.
  • Please provide the specific system information I mentioned above and that which is mentioned in the Forum Guidelines
  • What is the output of zpool import
  • What is the current pool layout via zpool status
  • Exactly how many disks you have installed in the system?
  • Can you get any output from systemctl -i /dev/{device} for each disk you have in the system, especially the ones a part of the pool you're trying to import?
  • Are you trying to import the pool from the same system you removed it from?

Hello again,

I read the forum guidelines and am including the info:

Build: Freenas 11.2-u6
CPU: Intel Celeron G530
RAM: 8 GB DDR3
Hard drives: 4 2TB Samsung HDD in RaidZ2

So here was my issue: I noticed that one disk in my 4-disk NAS was missing and I thought that it failed. So what i did was to disconnect the entire pool. Unfortunately, I checked both "delete configuration associated with pool" as well as "confirm export". I left the "destroy data" unchecked. So I went to check my NAS physically and saw that one of the SATA cables was unhinged and plugged it back in tightly. Lo and behold, my missing disk was back online. However, when I tried to import pool from the WebGUI, my old pool was not there. I assume it was because I "deleted configuration associated with pool". Which brings me here trying to get my pool back somehow. I am hoping that i can somehow recover all the data on my old pool :eek::eek:

Regarding your question:

1) output of zpool import says the following:

1569293926203.png


So it seems like it's still there?

2) output of zpool status:

1569294009957.png



3) I have 4 disks in RaidZ2

4) Lemme try that and repost later

5) yes, import to same system


I hope this helps. Thanks!
 

tpdinh

Dabbler
Joined
Dec 16, 2011
Messages
15
Hello again,

I searched the forums for some answers and I think I have the solution.

Do I "zpool export Dinh1" and then reboot system and then try the WebGui again for import?
 
Joined
Oct 18, 2018
Messages
969
Do I "zpool export Dinh1" and then reboot system and then try the WebGui again for import?
There is an import function in the GUI; I strongly recommend you stick to the GUI rather than the command line because it will set certain flags on your pool that FreeNAS expects. Check the documentation for your version of FreeNAS for how to import a pool. I expect that this will work without a hitch though.

In general, in the future, if a drive goes bad don't disconnect the entire pool. Troubleshoot the issue first. If the cables are bad, fix that; if the drive is bad resilver it. Unless you're moving disks between systems you likely don't need to export a pool.
 

tpdinh

Dabbler
Joined
Dec 16, 2011
Messages
15
There is an import function in the GUI; I strongly recommend you stick to the GUI rather than the command line because it will set certain flags on your pool that FreeNAS expects. Check the documentation for your version of FreeNAS for how to import a pool. I expect that this will work without a hitch though.

In general, in the future, if a drive goes bad don't disconnect the entire pool. Troubleshoot the issue first. If the cables are bad, fix that; if the drive is bad resilver it. Unless you're moving disks between systems you likely don't need to export a pool.

I tried the WebGUI import but it doesn't show up in the drop down menu :confused:

I only know the basics of FreeNAS so webgui is what i definitely stick to :)
 

tpdinh

Dabbler
Joined
Dec 16, 2011
Messages
15
There is an import function in the GUI; I strongly recommend you stick to the GUI rather than the command line because it will set certain flags on your pool that FreeNAS expects. Check the documentation for your version of FreeNAS for how to import a pool. I expect that this will work without a hitch though.

In general, in the future, if a drive goes bad don't disconnect the entire pool. Troubleshoot the issue first. If the cables are bad, fix that; if the drive is bad resilver it. Unless you're moving disks between systems you likely don't need to export a pool.

So if I don't need to export it (unless between systems), do you know of a solution to the webgui recognizing my pool?
 
Joined
Oct 18, 2018
Messages
969
I believe the issue is what is showing above in your screenshot; I had missed it on my initial reading.
One or more devices was being resilvered
.

Can you try zpool import {pool name} but replace {pool name} is whatever the name of the pool actually is. If that works give me the output of zpool status again; this time can you try to copy-paste the output and reply here with it in code tags?
 

tpdinh

Dabbler
Joined
Dec 16, 2011
Messages
15
I believe the issue is what is showing above in your screenshot; I had missed it on my initial reading. .

Can you try zpool import {pool name} but replace {pool name} is whatever the name of the pool actually is. If that works give me the output of zpool status again; this time can you try to copy-paste the output and reply here with it in code tags?

I tried to zpool import Dinh1 last night and it said something like "no pool found" or something like that. I can do it tonight when I get home. Thanks again for your help!
 

tpdinh

Dabbler
Joined
Dec 16, 2011
Messages
15
Hi Phil,

The screenshot below is the output from "zpool status" and "zpool import Dinh1(my volume name)"

Sorry I am total noob and don't know how to reply with code tags :(


1569367283454.png
 
Joined
Oct 18, 2018
Messages
969
Well, if you ssh into the machine you can copy-paste the terminal text into the reply on this thread. Code tags are accomplished via BB codes.

Looking at the above screenshots my guess is that the relevant bits are

From zpool import
One or more devices was being resilvered

From zpool import Dinh1
cannot import 'Dinh1': one or more devices is currently unavailable

Prior to you exporting the pool were you in the middle of replacing any drives?
What do you get when you type camcontrol devlist? This command should list all disks in the system.

It may be that you need to import a degraded pool. Before we go that route though a few important questions
1. Do you have a backup of the data
2. Do you have an additional 2TB drive already burned in in case one of your drives in your pool is bad?
 

tpdinh

Dabbler
Joined
Dec 16, 2011
Messages
15
Well, if you ssh into the machine you can copy-paste the terminal text into the reply on this thread. Code tags are accomplished via BB codes.

Looking at the above screenshots my guess is that the relevant bits are

From zpool import


From zpool import Dinh1


Prior to you exporting the pool were you in the middle of replacing any drives?
What do you get when you type camcontrol devlist? This command should list all disks in the system.

It may be that you need to import a degraded pool. Before we go that route though a few important questions
1. Do you have a backup of the data
2. Do you have an additional 2TB drive already burned in in case one of your drives in your pool is bad?

1) Yes, the system was resilvering automatically due to some bad sectors it had found.
2) I don't have backup :(
3) I don't have an extra 2 TB HDD on hand

Output of "camcontrol devlist" shows:

1569376304414.png
 
Joined
Oct 18, 2018
Messages
969
1) Yes, the system was resilvering automatically due to some bad sectors it had found.
...
3) I don't have an extra 2 TB HDD on hand
You will likely need to import a degraded pool in this case. I dont quite understand though, the pool is a 4 disk pool, you have 4 disks connected, you dont have any extra disks, but you say it was delivering? How could it be resilvering without an extra disk? How many disks originally belong to the pool?

You'll likely want to get a replacement 2TB drive and burn it in before proceeding. This was once you import the pool you can replace the drive immediately and decrease risk of data loss. Keep in mind you do not need to export your pool to replace a disk. The user guide contains relevant instructions.
 

tpdinh

Dabbler
Joined
Dec 16, 2011
Messages
15
Yea I thought resilvering was replacing a failed disk but i got an alert that the system was resilvering due to some bad sectors it had found. I still get this alert:


info
Device: /dev/ada1, 30 Currently unreadable (pending) sectors
Wed, 25 Sep 2019 00:09:12 GMT Dismiss

info
Device: /dev/ada2, 122 Currently unreadable (pending) sectors

This whole thing started when I was in the process of transferring 2 TB of data from the NAS to a new RAID10 setup.

So I need to get another 2TB drive and begin process of replacement after importing the degraded pool? If so, how do I import the degraded pool?
 
Joined
Oct 18, 2018
Messages
969
It may be worth looking at the smartctl -a /dev/{device} for each device to see which are bad.

Are those two drives your boot pool drives? Pending sectors is a sign that drives are on the way out.
 

tpdinh

Dabbler
Joined
Dec 16, 2011
Messages
15
So it seems like ada1 has some errors. Here is a small snippet of what it says:

1569378305166.png




These 4 drives, ada0, ada1, ada2, ada3 are in RaidZ2 and just data drives
 
Joined
Oct 18, 2018
Messages
969
If those drives are your data drives two of them are likely on the way out. You need to replace them with new drives most likely. It's probably a good idea to have new drives when you perform the import.
 

tpdinh

Dabbler
Joined
Dec 16, 2011
Messages
15
ok will do. I was planning to transfer everything anyways :D

So do I need to import pool in order to resilver with new drive? The menu
 
Joined
Oct 18, 2018
Messages
969
Yes, you must import the pool first. I advice you to look up how to properly burn in new drives, get new drives and burn them in, look up how to import a degraded pool then import the pool, look up how to resilver a disk for your version via the user guide and do that, then make sure you have email alerts, regular scrubs, and smart tests. Any time you get an error it is worth taking action sooner rather than later.
 
Top