Hello everybody!
Watch this video to see how to recover data from a RAID-z array.
How to build RAID-z and RAID-z2 arrays using the example of a device running TrueNAS operating
system, and how to get data from a damaged RAID array, or how to recover it if such data
is lost, accidentally removed or destroyed by formatting.
ZFS file system offers its own version of a software-based RAID known as RAID-Z.
In addition to a certain performance boost, it can also fix slightest aspects of data
corruption.
To monitor the situation, it detects bad blocks by using checksums and then corrects logical
errors immediately.
This feature helps the array to maintain integrity for all of its data.
However, even the most reliable file system and equipment can completely guarantee your
data against software and hardware failures.
In this video, you’ll see how to recover lost data from the ZFS file system and a RAID-z
array using it.
ZFS brief description ZFS is an open-source file system which is
mostly used in FreeNAS storage systems and other solutions based on Free BSD.
The data distribution mechanism in RAID-z is similar to the conventional RAID 5, but
it uses dynamic striping instead of fixed-width stripes.
The information about the size of each stripe is written to metadata.
Due to the dynamic nature of this file system, its data can only be recovered if the metadata
is not damaged.
ZFS has been developed with reliability in mind which is achieved by using various features
such as copy-on-write, redundant metadata, journaling and others.
Because of the complicated structure of this file system, conventional data recovery tools
are useless when it comes to restoring information from RAID-z arrays.
However, Hetman RAID Recovery can analyze its metadata to identify the proper structure
of RAID-z and then rebuild the damaged RAID automatically.
How to create a RAID-z2 For starters, let’s explore how to create
a RAID-z array, with the example of a storage device with a TrueNAS operating system.
In the previous video, I have already demonstrated how to install and configure such operating
system and how to create a RAID-z.
Now let’s find out how to build RAID-z2 (that is, an array of the second level).
Start by accessing the TrueNAS management menu and expanding the tab Storage – Pools.
Here, click the buttons “Add” and then “Create Pool.”
Give the pool name, and select disks – for RAID-z2 you need at least 4 disks – and
then click on this arrow below to add storage devices to the list.
Choose the drives here, and select the RAID level from the drop-down list, then click
Create.
In the pop-up window saying that all data will be erased, check the box here and click
“Create pool,” and it starts the process of formatting the drives and building the
RAID.
How to configure FTP connection To create a valid simulation of a typical
scenario, let’s configure an FTP connection, write data to the RAID array, them imitate
a situation involving loss or failure of the storage devise so that the data inside it
is no longer accessible.
Let’s begin by adding a new dataset for FTP connection.
Open the tab Storage - Pools - hit the three-dots button - Add Dataset.
Assign a name, don’t change other settings, and click Submit.
Create a new user for FTP: Accounts – Users – Add.
Give the name and password, uncheck the box next to “New Primary Group” and choose
“ftp” from the list.
Then select the directory we have created before, set the required permissions, and
save the settings by clicking “Submit.”
Let’s go back to the dataset we have created, and modify its permissions.
Click on the three-dots button – Edit Permission.
Choose the user – ftp and group – Ftp, check the box here, confirm it, then check
the boxes for Apply User and Apply Group, then save the settings.
Now the last step is to enable the FTP server.
Open Services, drag the slider to the “enabled” position, and check the box for automatic
startup.
The FTP connection is configured, so let’s check access in the Explorer: in the address
bar, type ftp://Ip-address of the server, and then the user’s login and password.
Now you can create a folder here and write some data there.
How to recover data from RAID-z of the first and second level
Data recovery from RAID-z Now let’s explore how to recover some information
that was removed accidentally from a RAID-z array.
RAID-Z1 makes sure that every unique block of data is written, so that recovery is possible
if any of the drives suffers a failure or breakdown.
In this case, data is distributed across the array in the most optimal way.
RAID-Z1 is very similar to RAID 5, as it uses single-parity data storage pattern, and it
is designed to survive losing one of the disks in its array.
But as I said before, only a few data recovery tools can handle this specific RAID type.
Hetman RAID Recovery Hetman RAID Recovery supports the ZFS file
system and RAID-z arrays of all levels.
This program can automatically rebuild a RAID system created with the help of that file
system.
This is a comprehensive solution for NAS data recovery to help you restore your files in
a number of different scenarios.
It supports most popular file systems including those used in RAID devices.
For recovery, take the disks out of the server and connect them to a Windows computer.
If your motherboard doesn’t have enough ports to connect all the drives, there are
all kinds of various adapters and expansion cards to fix this problem.
The program will scan the drives for service information automatically, and then it will
rebuild the RAID system on the fly.
As you can see, my RAID-z array is displayed in the Drive Manager.
To start the recovery process, analyze the drive: right-click on the array - Open - Fast
scan.
As we can see, with Fast Scan the program didn’t manage to find the deleted files,
but the files which are still on the disks are all available for recovery.
The bottom line is that Fast Scan will help you get your data back in case of a hardware
error or when your storage system breaks down.
The metadata structure in ZFS file system and RAID-z is designed in such a way that
the fast scan algorithm cannot find the deleted data because all information about it is erased
from the journal.
That is why you need to run Full Analysis in order to find the deleted files.
Right-click on the partition, select “Analyze again” and go for Full analysis, choose
the file system - Next - and wait until the scan is over.
This process can be quite long and the actual time required to complete it depends on the
size of your array.
When the scan is over, browse to the directory where the deleted files used to be and find
the ones you need to recover: for your convenience, there is a feature to search for files by
name.
Also, you can check file contents with the preview option.
As you can see, the program managed to find all the files that have been removed from
the disk.
As the final step, select the ones you need and click Recovery; don’t forget to select
where exactly the files have to be saved.
We don’t recommend saving them to the same disk, so make sure you have another storage
device to put your recovered data to.
When the recovery process is over, you’ll find all of the files in the folder you have
chosen.
How to recover data from a RAIDz2 system (second level)
In order to recover any information, from RAID-z2 (that is, a second-level array) you
also need to connect its disks to a Windows computer and then run Hetman RAID Recovery.
RAID-Z2 is more failure-resistant as it uses two parity blocks and two data blocks for
every single bunch of data.
It is similar to RAID 6 and it can survive even if two disks are down.
In RAID-Z2, you are required to use at least four disks.
So if your computer doesn’t have enough ports to connect all disks, you can easily
exclude two of them from the array.
All right, here is a case of a RAID array which was damaged because of the server or
controller failure.
As you can see, the program was able to rebuild the RAID even though two disks are missing.
Right-click on the RAID and run Fast Scan.
As a result, you can see the files which are still on the disks.
Select the ones you need to restore and do it.
If the program failed to find certain files, they may have been erased; in this case, try
Full analysis.
This will enable the program to find the data even if it was removed.
As a result of this testing, Hetman RAID Recovery was able to find 100% of data from a RAID-Z
array based on the ZFS file system and deployed on a TrueNAS server.
The program managed to recover files in their original form, without any damage or loss
of quality.
Hetman RAID Recovery will help you recover lost data if files are removed accidentally
from a hard disk inside a NAS system, if a hard disk is formatted, the disk array is
misconfigured, if there are any firmware issues, software errors, or in other scenarios involving
loss of data, or loss of access to the network drive, or damage to the RAID volume.
That is all for now!
Hopefully, this video was useful.
Remember to click the Like button and subscribe to our channel.
Leave comments to ask questions.
Thank you for watching.
Good luck.