Reinstalling freenas without a mirror boot

titinho

Cadet
Joined
May 16, 2019
Messages
8
So Im kinda new to freenas, but i manged to set up a server for a friend of mine like a year ago, last week he called a guy to solve some issues he was having, because i wasnt in the city at that moment. This guy told him that he should use windows server and formatted the OS drive and installed windows and delted the freenas installation.
Basically my question is, how do i revert it back, i have installed freenas on the boot drive, but i dont know how to add the previous pool.
Hope you guys can help me out, im new to this and im afraid to delete his data.

HW Specs:
Asrock z170 extreme 6
Intel i5 8400
16GB DDR4
4xSeagate 4tb drives
1xKingston SSD for boot

Im using Freenas 11.2-u4.1
 
Last edited:
Joined
Oct 18, 2018
Messages
969
Hi @titinho. Would you mind editing your post to contain the version of FreeNAS you're using and all of the relevant hardware specs? Check out the Forum Rules for information on this or my signature for an example. The reason is that it helps folks provide better answers in case something is relevant. It may be that lots of the details are not relevant to your specific issue, but it can't hurt to be descriptive. :)

Did your friend keep a copy of their system config? If so, you can follow the instructions in the User Guide to upload the system config and get the data back that way. Be sure you use the guide which matches your version of FreeNAS.

Otherwise, you may have success trying the import pool functionality. If the drives were not encrypted that should be relatively straight forward. If they were encrypted you will need the encryption key.

For your first attempts at doing this I recommend you stick to the GUI. FreeNAS makes use of a lot of ZFS flags when importing, mounting, and setting up pools. You may accidentally cause a problem trying to use the command line. If you are unable to do it through the GUI I recommend you keep track of exactly the steps you took and any errors or responses you got, repost them here if you are unsuccessful and folks will be able to help you further. Screenshots are your friend.
 

titinho

Cadet
Joined
May 16, 2019
Messages
8
Hi @PhiloEpisteme thx for the quick reply, i added the info you asked in my first post. My friend didnt kept the backup config, so that isnt an option. I will try the import pool functionality and report back with my results.
Thanks in advance.
 

titinho

Cadet
Joined
May 16, 2019
Messages
8
I worked like a charm, thx so much @PhiloEpisteme, but i have another question, im seeing an alert over the pool saying that it is degraded. Should i worry about that? Sorry if im asking noob questions, but if you can point me on the right direction i can research by myself. Thx again, you saved a year of work.
 
Joined
Oct 18, 2018
Messages
969
Should i worry about that? Sorry if im asking noob questions, but if you can point me on the right direction i can research by myself.
No worried about asking questions; that is the purpose of the forums.

You absolutely should worry about that. Put simply, a pool is where you store your data. A pool is made up of vdevs. Vdevs are composed of disks. If any single vdev fails the entire pool fails and you will likely lose the entire pool if you do not have a backup. A vdev fails if a number of drives fail such that there is not enough parity information to reproduce the data.

For example, a striped vdev fails if that single disk in the stripe fails. If a pool has a striped vdev and that single disk fails, the pool fails.
A Mirrored vdev requires all drives to fail before the vdev fails.
RAIDZ1 vdevs fail if > 1 drive fails. It can tolerate 1 drive failure.
RAIDZ2 vdevs fail if > 2 drive fails. It can tolerate 2 drive failures in a single vdev.
RAIDZ3 vdevs fail if > 3 drive fails. It can tolerate 3 drive failures in a single vdev.

A degraded state in one in which at least one vdev in your pool is unable to access one of its underlying disks but still has enough disks remaining to stay online through the use of parity data.

I think you would benefit from doing some reading on the basics of FreeNAS and ZFS. There are a lot of good resources. A good start might be this beginners slide show. FreeNAS is designed to protect your data and is based on ZFS. Both work very well but are not common consumer grade products. This means that they require a bit of know how to do correctly. Unfortunately if done incorrectly you may end up losing your data.

What you should do now . . .
1. Post the drive configuration. This can be done by providing a screenshot of the window you find by navigating to your pools and clicking the gear next to the pool in question and then clicking status.
2. Check if there are backups of any of the data.
3. Consider purchasing a new drive right away. If you're using 4TB drives I would suggest you consider picking up a 4TB WD Red or Seagate Iron Wolf.


I hope this helps. Post back with the info requested and hopefully we can sort this out!
 

titinho

Cadet
Joined
May 16, 2019
Messages
8
Thanks again, I used RAIDZ2 and all four drives are Seagate Iron Wolf wich I choose after reading the recommendations here.
All the snapshot are still there and fully functionally.
Here is the snapshot you asked for, in the meanwhile I will read those links. You've been really helpfull, thx again,
freenas.png
 

Stevie_1der

Explorer
Joined
Feb 5, 2019
Messages
80
This looks weird, only the "ada0p2" line seems normal, and I've never seen something like the last line.
The first two lines with "/dev/gptid..." show that the respective HDDs are missing, any more drive failure will lead to complete data loss.

Please post a screenshot of Storage -> Disks, to see what disks are currently recognized by FreeNAS.

Could be that the guy who deleted FreeNAS to install Win Server also killed two data drives.
Or they were faulty before, and because of that faults the problems started.
Are any backups of the data available?
If not, now would be the best time to create an external backup of all data.
 
Joined
Oct 18, 2018
Messages
969
Thanks for sending that along. Good news and bad news.

The last scrub found no errors. This is an indication that the data is not yet corrupted.

Also, your friend used RAIDZ2, which is good. Had they used RAIDZ1 the entire pool would've been lost already.

I don't see any alert notifications. If you just reimported the pool that is not surprising. When you reimported the pool are you certain you had all of the original drives installed? For example, the two drives which say UNAVAILABLE, are they installed into the machine?

The drive names are also a bit strange. Perhaps it is worth exploring that later once you've got the data secure.

If they are installed I would suggest you determine whether those two drives are bad or if there is an issue communicating with them.
To determine if the issue is a communication issue you can . . .

Determine if the machine can even see them
  • Go to Storage -> Disks. Do you see all the drives there? If not, are only two missing? And are the ones which are missing the ones in your pool? If they are installed in the machine but not listed perhaps the cables are bad or not properly plugged in.
  • Run a short and/or long SMART test on them. To do that use the instructions below for finding the device name and do smartctl -t long /dev/{name}. Once the tests are completed (it will tell you how long to wait) you can do smartctl -a /dev/{name} for the results. The fields you're likely most interested in are Reallocated_Sector_Ct, Current_Pending_Sector, Offline_Uncorrectable, and UDMA_CRC_Error_Count in the output. The first three indicate disk failure, the last one indicates communication issues.
Identifying the drives
In order to identify the /dev/{name} of those two drives you'll want to do the following.
User gpart list to find the drives whose rawuuid matches that of the two drives above, a90ea...a21e and a9d0...a21e. Once you've found those entries look for the Geom name. For example, it may read Geom name: da5 in which case you're looking at drive /dev/da5.

Recovery Measures
  • Purchase two replacement hard drives now. If you discover that the drives are in fact bad you want to replace them as soon as possible. If the drives are not bad, that is okay, it is good to have extra drives on hand.
  • Avoid heavy IO on that pool until the drives are replaced. This will avoid putting them under extra load and risk losing a drive.
 

titinho

Cadet
Joined
May 16, 2019
Messages
8
Well, here I am again, thx both of you guys for helping me out.
So I went to Storage -> Disks and all drives are there, but 2 of them say UNUSED. Also I used the gpart list command, but there is no rawuid that matches the one from the missing drives, so I wasnt able to run the smart tests.Hope we can solve this issue, but so far, all the info is there and accesible, and we are now trying to found some replaacement drives, which are very hard to find here in Argentina.
Here is the screenshot, hope this can help
storage disks.png
 
Joined
Oct 18, 2018
Messages
969
Interesting. Perhaps something went wrong with the import due to some fault on the disks. You can run burn in tests on those unused drives, and if they are good just use those. For 2TB drives you can expect full burn in testing to take a few days. There are plenty of resources about how to burn in and test a drive. A basic version is to run a short SMART test, a long SMART test, badblocks, and then finish with one final pass of SMART tests.

Even if those drives are still good you may want to try to find an additional 2TB drive so that if another drive goes bad you can replace it.

Once you have a drive you are ready to use be sure you follow the User Guide exactly for the disk replacement procedure.
 

titinho

Cadet
Joined
May 16, 2019
Messages
8
Interesting. Perhaps something went wrong with the import due to some fault on the disks. You can run burn in tests on those unused drives, and if they are good just use those. For 2TB drives you can expect full burn in testing to take a few days. There are plenty of resources about how to burn in and test a drive. A basic version is to run a short SMART test, a long SMART test, badblocks, and then finish with one final pass of SMART tests.

Even if those drives are still good you may want to try to find an additional 2TB drive so that if another drive goes bad you can replace it.

Once you have a drive you are ready to use be sure you follow the User Guide exactly for the disk replacement procedure.
I was checking the cables and found out that them are broken, we had those SATA data cables with a lock, and it is broken, Im gonna try new cables tomorrow, and worst case scenario new drives. I have already done two copies of the data, one to my friend and one still in my house. If new cables doesnt solve the problem, I was thinking of making a fresh new install and then copying all the info from the backups I made.
I will keep you posted, and once again thank you man.
 
Joined
Oct 18, 2018
Messages
969
I was checking the cables and found out that them are broken, we had those SATA data cables with a lock, and it is broken, Im gonna try new cables tomorrow, and worst case scenario new drives
Fingers crossed the issue is your cables. Either way, you may want to run at least a short and long SMART test on those drives. It looks promising though. :)

If new cables doesnt solve the problem, I was thinking of making a fresh new install and then copying all the info from the backups I made.
Even if the cables are not what is bad you can replace the drives in your pool without having to rebuild the entire pool. Of course, if you have those backups you can certainly start fresh. That may be a good option if you want to change the pool layout.

Asrock z170 extreme 6
Intel i5 8400
16GB DDR4
Was this hardware you bought specifically for FreeNAS or hardware you repurposed for FreeNAS?
 

titinho

Cadet
Joined
May 16, 2019
Messages
8
Was this hardware you bought specifically for FreeNAS or hardware you repurposed for FreeNAS?
The mother was from another build, the other harware was bought for the freenas specifically

You can run burn in tests on those unused drives, and if they are good just use those.
Those 2 drives were part of the original raid, I have no idea why they are marked as unused.

This afternoon Im gonna get the cables and start some testing, luckily he is already working with the back up I made yesterday, so I can have the server the weekend for testing, and sorting everything out.

Thanks again for your help, will keep you posted.
 

Stevie_1der

Explorer
Joined
Feb 5, 2019
Messages
80
The mother was from another build, the other harware was bought for the freenas specifically
Well, normally for FreeNAS use you'd buy a mainboard, CPU and RAM that all support ECC...

Those 2 drives were part of the original raid, I have no idea why they are marked as unused.
Maybe their partition tables got corrupted or deleted.
Please post the output of gpart list ada1 and gpart list ada3, so we can see what partitions are on the drives marked as unused.

Have you already performed a short or long SMART test on those drives?
If yes, please post the stats.
 
Top