Hello everybody!
Watch this video to find out how to recover an iSCSI LUN, with the example of a QNAP TS-412
storage system.
How to recover a network drive or how to access data from a damaged network storage device.
Although the iSCSI protocol is pretty old, it remains popular for building network storage
systems.
iSCSI is a protocol for management of storage systems and interaction between servers and
clients.
This protocol is used to transfer data over the network and enables you to see a network
drive as a local physical disk while the actual data storage system is arranged inside another
device.
Such disks are known as LUNs.
LUN is a logical unit number.
In other words, it’s a network drive or a partition of such drive which has its own
number in the iSCSI network.
iSCSI LUNs are used in NAS devices, and this functionality is available in Synology, QNAP
and other server-type systems.
How to recover iSCSI LUN If you have accidentally removed iSCSI LUN,
or deleted its data, or if you just can’t access the files stored on your NAS device,
there is no way you can do something about without using third-party data recovery tools.
There are only a few data recovery solutions for iSCSI disks.
So if you need a well-proven utility capable of restoring information from such disks,
use Hetman RAID Recovery.
It supports data recovery from iSCSI LUN disks.
First of all, let’s find out how to recover a lost network drive.
Before you start the recovery process, make sure you have a drive with the same or larger
capacity than the capacity of the drive from which you’re going to recover information.
Connect the drive to a Windows computer, download, install and start Hetman RAID Recovery, and
scan the drive.
After the scan, you should find the folder with the name “@iSCSI.”
Inside the folder, you are going to find all your iSCSI LUN disks in the form of images.
Judging by the size, find the one you need and recover it, or select all of them and
click “Recovery,” specify where to save the data and hit “Recovery” again.
When the process is over, you’ll find the file in the folder you have specified.
Now you can see that the program has recovered the file to the full extent, but it is no
longer a sparse file: in fact, the actual occupied disk space has grown to its full
size of 330 GB.
Having recovered this file, there is a choice of how to extract the information from there:
- The first option is to restore operability of the network drive with QNAP.
- The second way is to open the image file without program, scan it and recover the required
data.
How to restore operability of the network drive
If you choose the first method, you need to connect an empty drive to a QNAP device, boot
it, and create a new virtual disk of the same size as the previous one.
After that, copy the restored file to this new drive.
To copy the image file, connect both drives to a Linux computer or use other tools to
access the QNAP file system.
Mount and open the drive in the file manager; in the root directory of the mounted disk,
you can find a folder with the name @iscsi.img.
Rename this directory - for example, into @iscsi.img2, and then create a folder with
the same name, @iscsi.img.
After that, copy the restored file into the directory you have just created.
Do it with the help of the Terminal as you need to convert this image into a sparse file,
with the command for copying - “cp.”
Open the terminal and type the following command: cp /media/lin/1/iSCSI-q330-606d5c77.000 /media/lin/38c8b452-81c2-4347-afb4-49d71eaf7e6e/@iscsi.img/iSCSI-q330-606d5c77.000
--sparse=always where:
/media/lin/1/iSCSI-q330-606d5c77.000 – the path to the recovered image file.
/media/lin/38c8b452-81c2-4347-afb4-49d71eaf7e6e/@iscsi.img/iSCSI-q330-606d5c77.000 - the path where this file should be copied.
The parameter --sparse=always - is used to transform it into a sparse file.
If the file size is large, the copying process is going to take a lot of time.
The Terminal doesn’t display any information on the status of the copying process, but
you can view it in the system monitor: it shows the amount of information which is already
copied, so you can estimate how long you have to wait.
Now that the file has been copied to the dis, run the following command to check the result:
du -h iSCSI-q330-606d5c77.000.
Open this directory in the Terminal and type the command containing the file name.
As you can see, this file occupies less than 200 MB on the disk, although it is displayed
as having the size of 330 GB. 1 GB, 10 GB. 5 GB.
du -h --apparent-size iSCSI-q330-606d5c77.000 It confirms the fact that it has been converted
into a sparse file during the copy operation.
After the successful copying, you should modify the configuration file - replace the new network
drive’s name with the name that you need.
Connect the disk to a QNAP device and boot it.
Use Winscp or another utility to set up connection with the server.
Specify the IP address, login, password and sign in.
By default, Winscp doesn’t recognize hidden files; for starters, make such files visible
as this directory may be hidden.
Open the settings and make the app show hidden files.
Then follow this path /mnt/HDA_ROOT/.config, find a file with the name iscsi_trgt.conf
and open it.
Find the line LunMetapath and replace the name of the new LUN with the name of the file
that you have restored (iSCSI-q330-606d5c77.000).
iSCSI-330q-606d9e8b The number “001” at the end indicates
how many parts your ISCSI has.
In my case, it only consists of one drive.
Now exit the file and save changes.
If you have several drives, you need to change all their names.
Reboot the QNAP device and wait until it is ready again.
Now open the iSCSI initiator and reconnect the disk.
After that, the drive with all of its files should appear in the Explorer.
How to recover data from a restored iSCSI file
For the second method, you need to open the restored file with Hetman RAID Recovery.
Open the program, switch to the Tools tab and click “Mount disk.”
Give the path to the restored file: to have the program show your file in the field “Disk
images” select “All files” here, then choose the file and click “Open.”
The mounted disk will appear in the Drive Manager.
Right-click on it and choose “Open,” then select “Full analysis,” specify the file
system and click “Next,” and then “Finish” when the process is over.
The program has found and displayed the files stored on the network drive.
To have them back, select the ones you need, click “Recovery,” give the path to save
the files, and click “Recovery” again.
When the process is over, you will find the recovered files in the folder you have chosen.
As you can see, the second method is much easier.
If LUN was not removed, but the problem was caused by a NAS device failure, all you need
to do is to mount the disk image in the program and recover the information.
Recovering data from iSCSI LUN is no easy task and it requires special skills - and
specialized tools.
Our program will help you simplify this process, because it can recover data from a damaged
NAS device.
That is all for now!
Hopefully, this video was useful.
Remember to click the Like button and subscribe to our channel.
Push the bell button to receive notifications and never miss new videos.
Leave comments to ask questions.
Thank you for watching.
Good luck.