====== NAS - QNAP - Recover RAID or move data from broken NAS ====== Most NAS brands run Linux as a backbone, so it is usually easy to recover data by connecting the disks from the NAS to a system running Linux. ---- ===== Remove the drives from your NAS ===== **IMPORTANT:** Remember the order in which the disks were arranged in the NAS; as this may be needed for the recovery process. * It is usually good to place a sticker with the drive number onto each disk. ---- ===== Connect the disks from the NAS to a PC running Ubuntu ===== Prepare a PC with enough hard drive slots available to install the hard drives from your NAS. * For RAID or SHR configurations, connect all the hard drives (excluding hard drives used as hot spares) to your computer at the same time. **NOTE:** Ensure the file system running on the hard drives of your NAS are EXT4 or Btrfs. * If the computer does not have enough SATA ports or power connectors; then use some power splitter adapters and expansion cards as needed. If the NAS only had a single disk, then this disk should be immediately accessible and no further steps in these instructions are needed. ---- ===== Install mdadm ===== sudo apt-get install mdadm **NOTE:** When prompted for Postfix Configuration. * Select **No configuration** and complete the installation. ---- ===== Install lvm2 ===== sudo apt-get install lvm2 **NOTE:** This is needed for **vgchange**. ---- ===== Mount all of the hard drives ===== sudo mdadm -Asf && vgchange -ay **NOTE:** The files on the hard disks should be accessible. * **mdadm -Asf**: Assemble a pre-existing array. Scan config file or /proc/mdstat for missing information. Insist that mdadm accept the geometry and layout specified without question. * **vgchange -ay**: To activate all known volume groups in the system.