If your QNAP device is dead you cannot access the files on the disk on a linux machine. This is because QNAP has modified the kernel and lvm code. With this kernel and initrd, you can spawn a VM to access the disk contents.
I have never owned a QNAP device. This was a side project to recover the files from a QNAP disk for a colleague. The QNAP model the disk was extracted from was TS-251+. I would not know if the kernel/initrd would work for other QNAP devices.
You need a Linux host with qemu to spawn the VM.
- Plugin the disk to your linux host (via a usb dock)
- Activate the proper mdraid array (if applicable). Typically you have opted for RAID1 setup. The contents should be on the third partition.
cat /proc/mdstat
and activate the array withmdadm --run /dev/mdXXX
- Then spawn a VM using the kernel and initrd passing the mdraid array. The /dev/sdb1 here is a second disk in order to copy your files
qemu-system-x86_64 \ -kernel vmlinuz-3.12.6 \ -initrd initrd-lvm.img-3.12.6 \ -append "init=/bin/busybox console=ttyS0" \ -nographic -m 128M \ -drive file=/dev/md125 \ -drive file=/dev/sdb1 \ -serial mon:stdio
- Once booted you should be able to activate LVM volumes and copy your files
vgchange -ay mkdir -p /mnt/{src,dst} mount /dev/mapper/vg1-lv1 /mnt/src mount /dev/sdb /mnt/dst rsync -av /mnt/src /mnt/dst
- The initrd image contains an rsync binary for convinience and also a full build of busybox with all modules (bin/busybox2)