Recovering zpool / zvol from failed server

Grimm Spector

Explorer
Joined
Jan 28, 2018
Messages
50
I have a freenas system that was running on win 2016 server hyper-v with the drives directly passed through. The servers SSD holds the install image. Virtual drive. Etc.

I don’t care much about that part at moment but I do care about the data in the pool.

I am hoping to replace the server with a low power high memory replacement for just the freenas portion, running freenas bare metal. I want to save the data on the drives.

What is the best and safest way I can go about moving the drives and data into the new freenas system as it won’t be using the data or install from the failed servers OS. Or is there information I must somehow extract from the freenas virtual drive?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
If you have done the right thing passing through the drives, it should be a simple case of saving the config from the VM, moving the drives to the new hardware, installing FreeNAS and restoring the config.

It's not 100% clear if you are indicating that the existing VM FreeNAS has failed... I guess it depends how it failed as to how you might get the config in that case. (if you had moved your system dataset off the boot drive, you may be able to find it there, otherwise, it's easiest if you just backup the config).

It's probably also worth noting that passing disks through is quite different from passing the entire disk controller to the VM (which is what the experts in the forum recommend doing if you must virtualize FreeNAS).
 

Grimm Spector

Explorer
Joined
Jan 28, 2018
Messages
50
If you have done the right thing passing through the drives, it should be a simple case of saving the config from the VM, moving the drives to the new hardware, installing FreeNAS and restoring the config.

It's not 100% clear if you are indicating that the existing VM FreeNAS has failed... I guess it depends how it failed as to how you might get the config in that case. (if you had moved your system dataset off the boot drive, you may be able to find it there, otherwise, it's easiest if you just backup the config).

It's probably also worth noting that passing disks through is quite different from passing the entire disk controller to the VM (which is what the experts in the forum recommend doing if you must virtualize FreeNAS).

The VM itself was fine, but the server hardware has failed. Opening the VM isn’t possible on other hardware currently, though opening the virtual drives might be if I can find the right tool. In which case I’d need to know what config files to find and where in the file system to look.

I actually couldn’t figure out how to pass the SAS controller with modern Hyper-V, or I happily would have.

Without the config files, what happens if I connect the drives to another clean install of freenas?
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
If the system files were on the pool, the config would be backed up daily to /var/db/system/configs-***_very_large_number*** Drill down until you find the latest .db file. Here's a snip from one of mine using mc:
1562681374623.png


1562681185844.png
 

lopr

Explorer
Joined
Mar 19, 2015
Messages
71
Without the config files, what happens if I connect the drives to another clean install of freenas?
you can just import the pool on a clean system.
https://www.ixsystems.com/documentation/freenas/11.2-U5/storage.html#importing-a-pool
If you can't import it via the GUI because it was not exported clean, try on the console `zpool import -f tank` then it should import. I only moved disks/arrays to new hardware that I have exported or from shutdown systems.
 

Grimm Spector

Explorer
Joined
Jan 28, 2018
Messages
50
you can just import the pool on a clean system.
https://www.ixsystems.com/documentation/freenas/11.2-U5/storage.html#importing-a-pool
If you can't import it via the GUI because it was not exported clean, try on the console `zpool import -f tank` then it should import. I only moved disks/arrays to new hardware that I have exported or from shutdown systems.

It was never exported. But you say I can do it from a shutdown?

I can set up all the config over again, that part isn’t much of a concern for me, as long as I can preserve the file system and data.
 

Grimm Spector

Explorer
Joined
Jan 28, 2018
Messages
50
If the system files were on the pool, the config would be backed up daily to /var/db/system/configs-***_very_large_number*** Drill down until you find the latest .db file. Here's a snip from one of mine using mc:
View attachment 31786

View attachment 31785

I think I setup the system logs and such to a separate volume on the add which was a virtualized drive. So I may be able to mount that drive and pull the files out that way. What’s mc?
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
mc is Midnight Commander (comes with FreeNAS) - it's a convenient way to navigate the directory structure and look for files.
 

Grimm Spector

Explorer
Joined
Jan 28, 2018
Messages
50
mc is Midnight Commander (comes with FreeNAS) - it's a convenient way to navigate the directory structure and look for files.
Ah so I wouldn’t be able to run it without freenas running on the original box which is not possible.
 

lopr

Explorer
Joined
Mar 19, 2015
Messages
71
It was never exported. But you say I can do it from a shutdown?

I can set up all the config over again, that part isn’t much of a concern for me, as long as I can preserve the file system and data.
I once imported a pool just from an shutdown system without exporting it first and it worked without problem.
AFAIR the exporting just marks the pool as "not in use" and without it forces you to use the -f flag when trying to import so you don't import a pool accidentally that is in use by another system at the same time.

see: https://docs.oracle.com/cd/E19253-01/819-5461/gbchy/index.html
 
Top