Page 1 of 1

Bad USB drive (Solved)

Posted: 18 Dec 2017 00:39
by t_knightt
First off let may say thank you anyone who will try to help.

I build a Nas4Free server with my brother. It consists of 8x 1TB drives in one pool (one of the drives serving as parity check) as well as a additional 250gb drive that back-up up daily the sensitive data.

Now here's my problem, My USB drive went dead, but not completely, it just doesn't boot anymore but still functions. I formated a new USB device but unfoirtunately I did not keep a backup of the config file (I know....).

Not here's my question, since the old USB device is still fonctioning, is it possible to access the data on it to retrieve the config file ?

I'm a newbie, my brother did most of the work but is not available anymore.

I suspect there's a way to "mount" the drive but I don't want to mess anything up as all of my sensitive data is on this server.

Please help

Re: Bad USB drive

Posted: 18 Dec 2017 09:04
by raulfg3
no need to restore config ( is more easy but not inprescindible).

step to recover your NAS:
1 - Do a new fresh install on a new USB ( this is done, isn't it?).
2 - configure IP, and paswword & users
3 - import your Disk (clear config & import your disk).
4 - Recover your pool (import your pool , from webGUI or fron CLI : zpool import yourpoolname)
5 - Sync WebGUI with your recently imported Pool , Go To ZFS _ Config -> Synchronize and sync.
6 - Done, at this point your data are back and only need to configure all the services by hand (SAMBA, DLNA, ....).

If still wants to recover your config.xml, mount your old USB and find it on /cf/conf/config.xml ).

PD: Simmilar thread: ... xml#p79833

Re: Bad USB drive

Posted: 18 Dec 2017 13:54
by t_knightt
I will definitely try your first approach this evening.

If that doesn't work I will try and find how to mount the old usb drive.

Re: Bad USB drive

Posted: 19 Dec 2017 01:55
by t_knightt
I was able to retrieve an old configuration file, but for some reason my NAS1 still does not show up.

synchronise returns a "nothing to synchronise" message

my primary objective if to be able to acces the stripe drive

here is a screenshot ... lQFay9hTv6

hope someone can help will pay if need be

Re: Bad USB drive

Posted: 19 Dec 2017 07:38
by raulfg3
t_knightt wrote:
19 Dec 2017 01:55
synchronise returns a "nothing to synchronise" message
You need to import your pool first so is "Detected" prior to syncrhonize.

you can import from Shelll :

Code: Select all

zpool import NAS1

Code: Select all

zpool import BACKUP
use -f if first time fail eg:

Code: Select all

zpool import -f NAS1

once imported, must appear on Disk | ZFS | Configuration | Detected.

and at this point is when you can sync Detected with webGUI (Current)

Re: Bad USB drive

Posted: 20 Dec 2017 00:04
by t_knightt
I believe I am getting to the root of my problem.

when i try and import the poolsas indicated above with putty, I get "pool is formatted using a newer ZFS version"

Now I have been able to recover my config file from my old USB drive.

I had downloaded a nas4free image to burn onto a CD however I suspect it's the wrong version.

is there a way to identify the ZFS version from the config file and download the appropriate nas4free image file ? ( ... 49HmWO8pYl)

Re: Bad USB drive

Posted: 20 Dec 2017 07:26
by raulfg3
ZFS is retro compatible, so you do not need to install appropiate image file, you can import your pool from your latest N4F install, simply use the "-f" switch to "force" import.

once imported , please post zpool status to see warnings.

Re: Bad USB drive

Posted: 21 Dec 2017 03:28
by t_knightt
Ok turns out ZFS is not backward compatible. I tried forcing pool import but got the same error message.

I was however able to find the original Nas4free version and everything boots up and have acces to my data.

Now the only config file I was able to recover was one before I had a hardrive fail (last month).

So my main pool "NAS1" is degraded as you can see one disk cannot be found.

what's they best way to re-assign the disk to the new disk without screwing everything up

Re: Bad USB drive

Posted: 21 Dec 2017 04:27
by t_knightt
is it possible I need to reformat the replaced drive so it can be swapped in the degraded NAS1 pool ?

Re: Bad USB drive

Posted: 21 Dec 2017 07:07
by raulfg3
only need to push the button "Clean Config & Import Disk", after this go to ZFS Configuration Synchronice and Sync webGUI.

Re: Bad USB drive

Posted: 22 Dec 2017 01:19
by t_knightt
Your ZFS system is not healthy. It is not recommanded to import non healthy pools nor virtual devices that are part of a non healthy pool.

for some reason it's still trying to find the previous HDD.

See screen shot of the error message, it still says pool is unhealthy even after clear and import discs.