Planning for hardware failure

Status
Not open for further replies.

mcleanrs

Dabbler
Joined
Jun 1, 2011
Messages
10
It seems like with a NAS the redundancy that most people (rightfully) focus on is hard drives...so you do a raid5 or a raid6 so that 1-2 drives can fail without losing data, and maybe you even have a spare/fresh drive in the closet ready to go on that day when a drive fails.

I'm wondering what I should have in place in case something like my SATA controller or CPU dies. I know these situations are rare, but what do I do? If I just sub in another compatible (Though not necessarily identical) SATA controller, would FreeNAS automagically figure out how to get my drives together again? Could I move the whole thing into a new box so long as I brought along the USB drive that contains FreeNAS?

Forgive the naivety of the question...I know the answers to these questions when I'm just dealing with a single drive, but when I'm talking about 4 or 5 drives suddenly things become more complicated!
 

esamett

Patron
Joined
May 28, 2011
Messages
345
Others should verify this: I think if you have saved the configuration file then the swap may be easiest. If this doesn't work then you (auto)import the old volume on the new nas. Should be easy-peasy-lemon-squeezy.
 
Joined
May 27, 2011
Messages
566
make sure you have a good copy of your configurations, back it up after you get stable changes. when the worst happens.

1. rebuild your system WITHOUT your data drives.
2. load your configurations.
3. remove all your pools.
4. shut the system off and add all your drives.
5. use the import utility.

If it can't add them properly, this could be due to them not being properly exported. ssh in and use the force flag for import (#zpool import -f...), then export them (#zpool export), then use the utility to import them.
 

mcleanrs

Dabbler
Joined
Jun 1, 2011
Messages
10
and my config is just the little file that I downloaded locally by hitting System>Settings>Config and then "Save Config" -- it's just a tiny 200 kb file!

Is there a way to automate backing that up, or should I just make a habit of saving it anytime I make configuration changes through the webpage? I guess I could hang another flash drive off my router (Which will share filesystems...just slowly) expressly for automatic backup of configuration!
 

sualokin

Cadet
Joined
Jun 2, 2011
Messages
4
so now I'm stuck

I've followed your advice in detail and could import the ZFS pools that didn't contain any data but the two disks that actually contain data can not be imported.
To give you a bit of the background story:
Last week I installed Freenas as it seemed the best option to centralize all my data and it has a nice iSCSI feature. After installing I copied all my data onto the disks and it seemed to work nice but then the USB stick died on me and I logically didn't have my config saved at that time.
Got a new stick put Freenas back on and couldn't import my ZFS drives.
In the CLI i saw the disks with zpool import. Used then the zpool command but couldn't see it in the Web ui.
Read your thread and cleanly exported all the previous disk. In the Web ui it started then nicely to auto import the columes but when I got to the two remaining volumes that actually contain data it shows me on auto import nothing to select. I.e. I Can't import them. what do I do now as I wouldn't like loosing all this data.

thanks in advance for your help
 
Joined
May 27, 2011
Messages
566
I've followed your advice in detail and could import the ZFS pools that didn't contain any data but the two disks that actually contain data can not be imported.
To give you a bit of the background story:
Last week I installed Freenas as it seemed the best option to centralize all my data and it has a nice iSCSI feature. After installing I copied all my data onto the disks and it seemed to work nice but then the USB stick died on me and I logically didn't have my config saved at that time.
Got a new stick put Freenas back on and couldn't import my ZFS drives.
In the CLI i saw the disks with zpool import. Used then the zpool command but couldn't see it in the Web ui.
Read your thread and cleanly exported all the previous disk. In the Web ui it started then nicely to auto import the columes but when I got to the two remaining volumes that actually contain data it shows me on auto import nothing to select. I.e. I Can't import them. what do I do now as I wouldn't like loosing all this data.

thanks in advance for your help


so what was the original structure of your disks. how many, which were assigned to which pool etc please be very detailed.

please also post the output of:

zpool status
zpool import
sysctl -n kern.disks
 

sualokin

Cadet
Joined
Jun 2, 2011
Messages
4
even more stuck then before and buffled

The original structure was 3 pools containing each on disk and data sets to avoid issues in case one of the disks crashes.
Pool1 = Data1_2TB
Dataset = Data1_2TB/mov
Pool2 = Data2_2TB
Dataset = Data2_2TB/tv
Dataset = Data2_2TB/docu
Pool3 = Data3_2TB
Dataset = Data3_2TB/home

I could import pool3 including the dataset however in the scanmask for new drives to be created it still offered me ada2 to be configured for a new drive and the autoimport never went to pool2. Offering only an empty selection.
Therefore I destroyed pool3 since it didn't contain data as of now and created a new pool called disk3_2TB in the hope that i can import then pool2 and pool1. still not possible.
Needless to say pool1 and pool2 contain data which would be quite inconvenient to loose.

If you need more info pls let me know I think I'm getting desperate ;)

here the output:

freenas# zpool status
pool: Disk3_2TB
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
Disk3_2TB ONLINE 0 0 0
gpt/ada2 ONLINE 0 0 0

errors: No known data errors

freenas# zpool import
pool: Data1_2TB
id: 11401147684520641632
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

Data1_2TB ONLINE
gpt/ada0 ONLINE

pool: Data2_2TB
id: 233642641942165955
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

Data2_2TB ONLINE
gpt/ada1 ONLINE



freenas# sysctl -n kern.disks
ada2 ada1 ada0 da0
 

sualokin

Cadet
Joined
Jun 2, 2011
Messages
4
Sorry forgot to mention that before the usb stick crashing I ran the i386 version and with the replacement I use the AMD64 version which should not make a difference
 
Joined
May 27, 2011
Messages
566
ok, so your system is seeing 4 disks,

da0 is the USB
ada2 is Disk3_2TB, it is imported.

ada0 is Data1_2TB it is not imported
ada1 is Data2_2TB it is not imported


try running

zpool import -f Data1_2TB
then
zpool import -f Data2_2TB

then look in /mnt they should be mounted there.
 

sualokin

Cadet
Joined
Jun 2, 2011
Messages
4
Thanks a lot for your help. The mounting in the cli wasn't the problem that I got done but I couldn't import it in the web ui.
However an upgrade to 8.0.1 fixed that and it seems to work.
Thanks again for your help
 
Status
Not open for further replies.
Top