There are different file systems used to format the hard drives or other storage drives, depending on the operating system like Windows, Linux, macOS, etc. The Linux operating system supports the storage devices, including the network attached storage (NAS) drives, formatted with the Ext (2, 3, or 4) file system. NAS is a dedicated data storage device that is connected with other systems over a local network. It can be set up with multiple individual hard drives or deployed with a RAID array.
Like other storage devices, data loss can also occur in NAS devices. Generally, data loss in NAS can occur due to the following reasons:
- Accidental deletion of files
- Accidental formatting of volumes/partitions
- File system errors
- Drive failure
- Damaged or malfunctioning RAID controller
- Corrupt RAID controller firmware
- Abrupt power outages during read/write operation
- Incorrect rebuilding of RAID array after an issue
Below, we will see how to recover data from Ext 4, 3, or 2 NAS Linux device.
Methods to Recover Data from NAS Devices
You can follow the methods mentioned below to recover data from NAS device on Linux, depending on the cause of data loss.
Method 1: Hot-Swap the Failed Member Drive
If you’re using RAID-based NAS and lost data due to drive failure, you can hot-swap the failed drive with a new one to restore the data. After hot-swapping the failed drive/s, the RAID controller automatically rebuilds the data in the new drive by calculating the parity in other member drives. Make sure that the new drive will be of same storage capacity as the failed drive.
However, data recovery depends on the RAID configuration you’re using. For example, if you’re using RAID 5 array, then it can withstand one drive failure, whereas RAID 6 array can withstand two drive failure.
Method 2: Recover Data from Backup
NAS solution providers, like Synology, QNAP, etc., offer a data backup solutions to backup data to local volumes, external devices, or cloud storage. This helps restore files in case of accidental deletion, accidental formatting of a volume, etc. For example, Synology NAS device comes with a data backup solution, called the Hyper Backup. If you’re using any such backup solution, you can easily restore the lost data from your Ext 4/3/2 NAS device.
Method 3: Use a NAS Data Recovery Software
If you don’t have a backup, then the only option is to use a professional NAS data recovery software, like Stellar Toolkit for Data Recovery. It is a DIY data recovery software that allows you to recover data from NAS devices lost due to accidental deletion, volume formatting, drive failure, and various other reasons. This software supports recovery of data from Synology NAS devices, SHR, and even from RAID-based NAS devices. It can recover data from Linux storage devices, having Ext 4, 3, and 2 file systems.
To recover data from NAS device using this software, you need remove the member drives from the NAS enclosure and connect them to a Windows computer. Make sure to label the member drives in the correct order before removing them. You may refer to this documentation for more details.
Now, follow the steps given below to use Stellar Toolkit for Data Recovery to recover data from EXT4/3/2 NAS:
- Download and install Stellar Toolkit for Data Recovery from its official website on the Windows system where you’ve connected the NAS drives.
- Launch the software. You will see the Select What to Recover screen. Select the All Data option and click Next to proceed.
- On the Recover From screen, choose the NAS drive under the Connected Drives section. Click Scan.
- The software will scan the connected NAS drives. After the scanning is complete, the software will list all the recoverable files. You can click on a file to preview it.
- After previewing the recoverable files, choose the files that you want to recover. Click on Recover to save the recoverable files.
Note – If you have downloaded the free version of the software, you will have to purchase the licensed version to save the recovered files.
- Click on Browse to select the folder/path to save the recovered files. This can be an external storage drive or a different volume on the computer. After selecting the location, click on Start Saving to save the recovered files.
When the saving process is finished, go to the save location and check the recovered files.
Conclusion
Data loss from a NAS device can happen due to numerous reasons, such as accidental deletion, corruption, drive failure, partition loss, etc. You can follow the methods explained above to recover the data from Ext 4/3/2 Linux NAS device, based on the data loss reason. However, the best option is to use an advanced NAS recovery software, such as Stellar Toolkit for Data Recovery. This software can help you recover data from Linux storage devices with Ext 4, 3, or 2 file system, and even RAID-based NAS. To avoid data loss in future, always follow the 3-2-1 data backup strategy.