Good morning,
1 year ago i ve made a NAS4FREE with an old hardware. I ve created a ZFS partition where to store my data.
Now i would like to simulate a disaster recovery. before the hardware to die, i want to recover my data from zfs.
I tried to put the 1tb hard drive via USB to a UBUNTU pc, and i see that it's not possible to read zfs partition, gparted tells me "unknown" file system.
So i read that Solaris can read zfs, i tried with a usb live pen (http://www.oracle.com/technetwork/serve ... 45079.html) but gparted tell me the same.
Well, how could i recover my data easilty?
i also wrote to ubuntu forum here http://forum.ubuntu-it.org/viewtopic.php?f=75&t=619283 and they told me to do that:
1) sudo gedit /etc/apt/sources.list
2) replace all with:
deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
3) sudo apt-get update
4) sudo apt-get install zfs
so i installed ZFS correctly, but my external hard drive is always seen as unknown. how could i "mount" my existing POOL without lose data?
Can you tell me if there is an easily way to recover data from ZFS in case of hardware disaster?
Thank you
This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
Read ZFS to recover data
-
kenZ71
- Advanced User

- Posts: 379
- Joined: 27 Jun 2012 20:18
- Location: Northeast, USA
- Status: Offline
Re: Read ZFS to recover data
I like your efforts and your are very close.
After you complete Step 4 type:
zpool status
You should see a response indicating no pools found.
Next try:
zpool import tank
Assuming your pool name is tank.
After you complete Step 4 type:
zpool status
You should see a response indicating no pools found.
Next try:
zpool import tank
Assuming your pool name is tank.
11.2-RELEASE-p3 | ZFS Mirror - 2 x 8TB WD Red | 28GB ECC Ram
HP ML10v2 x64-embedded on Intel(R) Core(TM) i3-4150 CPU @ 3.50GHz
Extra memory so I can host a couple VMs
1) Unifi Controller on Ubuntu
2) Librenms on Ubuntu
HP ML10v2 x64-embedded on Intel(R) Core(TM) i3-4150 CPU @ 3.50GHz
Extra memory so I can host a couple VMs
1) Unifi Controller on Ubuntu
2) Librenms on Ubuntu
-
konig87
- NewUser

- Posts: 12
- Joined: 27 Apr 2015 10:14
- Status: Offline
Re: Read ZFS to recover data
i could don't know what is my pool name!
i don't remember
- crowi
- Forum Moderator

- Posts: 1176
- Joined: 21 Feb 2013 16:18
- Location: Munich, Germany
- Status: Offline
Re: Read ZFS to recover data
step 5) plug you hdd to a computer
6) boot nas4free liveCD/liveusb
7) import disk and sync your pool
6) boot nas4free liveCD/liveusb
7) import disk and sync your pool
NAS 1: Milchkuh: Asrock C2550D4I, Intel Avoton C2550 Quad-Core, 16GB DDR3 ECC, 5x3TB WD Red RaidZ1 +60 GB SSD for ZIL/L2ARC, APC-Back UPS 350 CS, NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded
-
konig87
- NewUser

- Posts: 12
- Joined: 27 Apr 2015 10:14
- Status: Offline
Re: Read ZFS to recover data
so, could i import disk and sync my pool in LIVE usb? how to, in detail? after done, can i save my data in some way thank to the network?
i m only simulating a disaster, but this COULD really happen because hardware is not immortal.
i m only simulating a disaster, but this COULD really happen because hardware is not immortal.
- crowi
- Forum Moderator

- Posts: 1176
- Joined: 21 Feb 2013 16:18
- Location: Munich, Germany
- Status: Offline
Re: Read ZFS to recover data
yes, sure, boot from live cd/usb, configure the network, log in to the webgui, if needed add or import the disk in disks | management
go to disks | zfs, synchronize the pool, setup a share and save your data.
as long as you don't reboot your machine all settings are persistant.
or install N4F freshly and restore a previously exported config...
and always have a backup of your data, the possibility of a disk failure is more likely than a broken OS
go to disks | zfs, synchronize the pool, setup a share and save your data.
as long as you don't reboot your machine all settings are persistant.
or install N4F freshly and restore a previously exported config...
and always have a backup of your data, the possibility of a disk failure is more likely than a broken OS
NAS 1: Milchkuh: Asrock C2550D4I, Intel Avoton C2550 Quad-Core, 16GB DDR3 ECC, 5x3TB WD Red RaidZ1 +60 GB SSD for ZIL/L2ARC, APC-Back UPS 350 CS, NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded
-
konig87
- NewUser

- Posts: 12
- Joined: 27 Apr 2015 10:14
- Status: Offline
Re: Read ZFS to recover data
yes, i always backup my data even because i have a zfs virtual raid configuration. HDD are two, mirroring. i m only simulating now, you know it's better to do it before. i ll try next week with usb bootable N4F, and i ll let you know. stay tuned 
-
konig87
- NewUser

- Posts: 12
- Joined: 27 Apr 2015 10:14
- Status: Offline
Re: Read ZFS to recover data
Sorry for delay! i m back. Well, i have saved configuration from working nas, shut down nas, moved the hard drive on another machine and run in LIVE MODE. I set the ip addredd, i log in into nas4free page and try to LOAD configuration in order to recover my data from the HDD.
The file name is config-nas4free.local-20170407104745.gz and i used the same version of nas4free because i still have the original CD. it is 9.3.0.2 - Nayla (revision 1391).
But when i try to restore configuration,it tells me The configuration could not be restored. Invalid file format.
So i tried to extract the GZ file, and when i try again it tell me XML error: Not well-formed (invalid token) at line 1
how could i recover, then, my POOL and the Folder Tree structure?
Thanks again
PS following your instructions i tried from MANAGMENT--IMPORT DISKS, i imported but it tell me:ada0 WDC WD40PURX-64GVNY0 3815448MB WD-WCC4E2ND3NJ1 ata1 Intel ICH7 SATA300 controller Always on Unknown or unformatted ONLINE
the hard drive is one of two mirror software raid. The original is something like that:
pool: Mname
state: Online
mirror-0 Online
ada0 online
ada1 online
(this is screen from the original working nas, i m only simulating a recover from 1 of 2 hard disk, in another hardware machine)
The file name is config-nas4free.local-20170407104745.gz and i used the same version of nas4free because i still have the original CD. it is 9.3.0.2 - Nayla (revision 1391).
But when i try to restore configuration,it tells me The configuration could not be restored. Invalid file format.
So i tried to extract the GZ file, and when i try again it tell me XML error: Not well-formed (invalid token) at line 1
how could i recover, then, my POOL and the Folder Tree structure?
Thanks again
PS following your instructions i tried from MANAGMENT--IMPORT DISKS, i imported but it tell me:ada0 WDC WD40PURX-64GVNY0 3815448MB WD-WCC4E2ND3NJ1 ata1 Intel ICH7 SATA300 controller Always on Unknown or unformatted ONLINE
the hard drive is one of two mirror software raid. The original is something like that:
pool: Mname
state: Online
mirror-0 Online
ada0 online
ada1 online
(this is screen from the original working nas, i m only simulating a recover from 1 of 2 hard disk, in another hardware machine)
-
konig87
- NewUser

- Posts: 12
- Joined: 27 Apr 2015 10:14
- Status: Offline
Re: Read ZFS to recover data
UPGRADE: i ve made it on my own.
Here the steps, i m sure i will need it some day.
IF ONE HDD OF ZFS SOFTWARE RAID FAILS, OR HARDWARE FAILS, HOW TO RECOVER DATA IN RUDE-MODE:
1) start up Nas4free from live cd, one of 2 hard drive must be connected
2) set up ip address in this new live-machine
3) log into web panel with another pc in the network, use admin -- nas4free as username and password
4) Go to Disks|ZFS|Configuration|Detected and click on IMPORT ON-DISK ZFS CONFIG
5) it tells you ZFS system is not healthy. Sure, just because there is only ONE of TWO mirror drives connected on this new macine
6) now create new shares in CIFS/SMB and Activate Smb
a) Services|CIFS/SMB|Settings --> ENABLE on the right--> Save
b) Services|CIFS/SMB|Shares --> + --> Name: put_your_name --> PATH: /mnt/Mname --> Apply
7) now you can save data from another PC, going into the NAS and copy/paste. use path like: \\ip_nas to see folders and copy/paste in a safe place
After that, you can dedice to re-install in a new machine or recover raid if possible.
I prefere to begin again from the top, from the step zero where you install it and later paste the files that you previously copied in a new location.
Here the steps, i m sure i will need it some day.
IF ONE HDD OF ZFS SOFTWARE RAID FAILS, OR HARDWARE FAILS, HOW TO RECOVER DATA IN RUDE-MODE:
1) start up Nas4free from live cd, one of 2 hard drive must be connected
2) set up ip address in this new live-machine
3) log into web panel with another pc in the network, use admin -- nas4free as username and password
4) Go to Disks|ZFS|Configuration|Detected and click on IMPORT ON-DISK ZFS CONFIG
5) it tells you ZFS system is not healthy. Sure, just because there is only ONE of TWO mirror drives connected on this new macine
6) now create new shares in CIFS/SMB and Activate Smb
a) Services|CIFS/SMB|Settings --> ENABLE on the right--> Save
b) Services|CIFS/SMB|Shares --> + --> Name: put_your_name --> PATH: /mnt/Mname --> Apply
7) now you can save data from another PC, going into the NAS and copy/paste. use path like: \\ip_nas to see folders and copy/paste in a safe place
After that, you can dedice to re-install in a new machine or recover raid if possible.
I prefere to begin again from the top, from the step zero where you install it and later paste the files that you previously copied in a new location.