Theoretical Question - MOBO Dies - Just move USB and Drives over to new setup?

Status
Not open for further replies.

TDPsGM

Explorer
Joined
Oct 27, 2011
Messages
71
I have Read the Manual for release 8.3.0 and reviewed the great powerpoint here;
http://forums.freenas.org/showthrea...explaining-VDev-zpool-ZIL-and-L2ARC-for-noobs!

If everything is up and running:
FreeNAS8 running from a usb drive and I have 4 Drives set up in a Raidz2 setup . . .

If the motherboard dies for example, can I just get a new one with ram, etc, etc, and configure the Bios to boot from the USB Drive, Hook all the drives up and be up and running again?

.... or as part of the FreeNAS 8 install on the usb Drive, are there "Drivers" per se that are relative to the OLD mobo that won't work on the new one?

Thanks
 

ben

FreeNAS GUI Developer
Joined
May 24, 2011
Messages
373
That should work fine. Make sure also to back up the config file every time you change it so you always have a recent version, in case you DO need to do a clean install. In that case you can just import the volumes and config backup.
 

TDPsGM

Explorer
Joined
Oct 27, 2011
Messages
71
Thanks ben. Good to know.

That makes things simple.
 

TDPsGM

Explorer
Joined
Oct 27, 2011
Messages
71
This is kind of interesting:
http://docs.huihoo.com/opensolaris/solaris-zfs-administration-guide/html/ch04s06.html

Under the 2nd header; Preparing for ZFS Storage Pool Migration

it says:

If you do not explicitly export the pool, but instead remove the disks manually, you can still import the resulting pool on another system. However, you might lose the last few seconds of data transactions, and the pool will appear faulted on the original machine because the devices are no longer present. By default, the destination machine refuses to import a pool that has not been explicitly exported. This condition is necessary to prevent accidentally importing an active pool that consists of network attached storage that is still in use on another system.

This would kind of be what it is like if the mobo fails as I would NOT have "Exported" the zPool . . . No? Is that only an opensolaris thing?

I am still doing lots of reading, and that made me come back to this thread with the question.
 

ben

FreeNAS GUI Developer
Joined
May 24, 2011
Messages
373
Yes, it's always better to export a clean pool for migration. However, FreeNAS can force-import a pool if necessary and possible.
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
It's cool. I've done it several times in my testing across various platforms and operating systems. The pool import process is quite reliable -- new box just needs to support ZFS v. 28 or better.
 

TDPsGM

Explorer
Joined
Oct 27, 2011
Messages
71
Great, Thanks Guys.
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
The only bit of entertainment you may have is that if the network card driver changes for the new hardware, you'll probably have to manually set up the TCP/IP details at the console like you did first setup. Apart from that all should be well.
 

TDPsGM

Explorer
Joined
Oct 27, 2011
Messages
71
Good to know JaimieV - thanks.
 

TDPsGM

Explorer
Joined
Oct 27, 2011
Messages
71
Is this normal?

I just created my new 4 x 2TB Raidz2
Fresh install of FreeNAS-8.3.0-RELEASE-p1-x64 (r12825)
Added Username and new password and just a couple of minor initial settings like time zone and what not.
I didn't have any data written or users permissions or shares created (though I should have because I wanted to see what would happen).

I was just tinkering, wondering what would happen if I switched 2 of the sata cables after shutting down.
The zPool creation started out like this:

drive 1 ==> hooked to sata port #3 ==> seen in FreeNAS GUI as ada2
drive 2 ==> hooked to sata port #4 ==> seen in FreeNAS GUI as ada3
drive 3 ==> hooked to sata port #1 ==> seen in FreeNAS GUI as ada0
drive 4 ==> hooked to sata port #2 ==> seen in FreeNAS GUI as ada1

After I shut down I switched cables for drives 2 and 4 and restarted. here is what I saw:

drive 1 ==> hooked to sata port #3 ==> seen in FreeNAS GUI as ada2
drive 2 ==> hooked to sata port #2 ==> seen in FreeNAS GUI as ada1
drive 3 ==> hooked to sata port #1 ==> seen in FreeNAS GUI as ada0
drive 4 ==> hooked to sata port #4 ==> seen in FreeNAS GUI as ada3

That's fine, but what threw me is that all the settings that I saved WERE GONE!
No username, password, time zone settings . . . it was all gone!


Now I didn't read this in the manual anywhere but if I have to move this zPool to entirely new hardware it sounds like I may have to make sure that all the Sata ports are hooked up to the same drive(s) . . .
is that right?

Do I risk loosing data if I DON'T hook the correct drive up to the correct sata port?

Shutting down, switching the cables back, and restarting didn't bring my initial settings back.
Why?
Where is it saved, and why did it disappear in the first place?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
The ports do not matter.. at all. All that matters is that the controller the ports are connected to is supported and the driver loads in FreeNAS.

FreeNAS basically sees a bunch of disks. This is how ZFS works, period.

I can guarantee you that if you selected ada0, ada1, ada2 and ada3 in that order they are NOT in the zpool order ada0, ada1, ada2, and ada3. From what I've seen there isn't any kind of pattern to what it chooses. It jumps around between different controllers, /dev names, etc.

So no, switching 2 drives cables doesn't matter.. at all. My guess is that you didn't actually click save after entering some of the info or your USB stick is going bad. Did you try saving the password and stuff and rebooting?

I think this thread has made it completely clear that if you pull your hard drives out of your server and blow up your server with a stick of dynamite and build a whole new server with a totally different SATA controller the zpool will just auto-magically reappear when you choose the auto-import option of your zpool. PERIOD. None of this "but what port.." and "but what controller"... and any other BS. If the SATA port works on FreeNAS that is ALL that matters.

Don't try to fool yourself with which disk is number 1/4 and 2/4. ZFS doesn't work that way and there's absolutely NOTHING special about being 1/4 of 4/4. All that is important is that the ports work and that you have enough disks for the vdevs to mount. I have never labeled my disks aside from the vdev it is in because it doesn't matter which disk is first or last or in the middle.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I can't explain why your settings were lost, but switching cables on the drives should have had nothing to do with it, so you *might* have possibly found a bug if what you describe is true. However, it's always a good idea to backup your settings just in case, although your experiment did find an interesting problem!

There are several posts that discuss drive to port mappings and why they don't or shouldn't matter. You'll have to search, they're here in the forums.

In the mean time, here are a couple of commands you might want to play with if you want to see how/where info about the disks works. ZFS *knows* which disks belong to its pools and it doesn't matter if you switch cables or hook them to another controller.

Code:
sqlite3 /data/freenas-v1.db "select * from storage_disk;"

sqlite3 /data/freenas-v1.db "select * from storage_diskgroup;"

zdb -l /dev/ada0p2
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
The settings are kept on the USB stick where FreeNAS is installed.

They should not be affected by messing with the data disks at all. As the others said, you may have found a bug - in which case, have a go at reproducing and put in a bug report.

You were pressing "save" on the configs as you went along, yes?
 

TDPsGM

Explorer
Joined
Oct 27, 2011
Messages
71
noobsauce80, protosd, JaimieV ===> Thanks for the replys.

I am pretty darn sure that I "did" save it, but as soon as I get a chance I'll repeat the test and take some screen shots if need be.
I have test data on the Array now so I can play around and still make sure I can access it correctly.

. . . although your experiment did find an interesting problem! . . . .

Is it the fact that ada0 should ALWAYS be ada0 regardless of which sata port I plug into?
I assume that's what you meant by
. . .drive to port mappings . . .

I want to experiment with "Real World" possibilities; proof of concept / understanding if you will, before I commit my data more seriously.

Comments are much appreciated!
 

Stephens

Patron
Joined
Jun 19, 2012
Messages
496
No, it's not guaranteed that ada0 will always be ada0 regardless of which sata port you plug into. Rather, the drive plugged into ada0 should still be recognized as part of the pool even if it becomes ada1.
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
ZFS's allocation of drives is very free form: if you have an issue with the host computer, you could (for example) pull all the SATA drives that make up your RAIDZ array, put half into USB cases and the other half into eSATA cases, plug them all into a spare machine, and boot it off a freshly made FreeNAS8 stick - and you'll be able to attach and share the RAID again. Very useful indeed in an emergency.

The device names are really just current placeholders. Don't try to rationalise them, as they are not entirely rationally assigned.

This is important when it comes to a drive needing replacement: By far the best method is to check the *serial number* of the drive, which is read from the drive itself, and use that as the identifier. Not the device name.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Status
Not open for further replies.
Top