
Synology: Access data on Synology SHR
Having a reliable disks and redundancy on a Network Attached Storage (NAS) is important. But when your NAS dies and suddenly can't access the files on any of the disks is a shocker. How I overcame that shocker and got access on that files.
In no event, unless required by applicable law or agreed to in writing will I be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use the information, commands, scripts and snippets provided here (including but not limited to loss of data or data being rendered inaccurate, or losses sustained by you or third parties, or a failure of the command/script/snippets to operate with any other programs), even if such holder or other party has been advised of the possibility of such damages.
Writing articles like this one requires time and resources. If you found it helpful or even if you didn't, I'd love to hear from you—whether you have feedback, suggestions, or spotted any bugs or typos. Your input would mean the world to me! You can reach out using the email address listed in the imprint.
The good thing was: There was no urgent need to get on those files. The NAS did not die - the disks were only swapped with some bigger ones. Also there were multiple backups. But exactly this is the right time to check if you could access the files if you needed it.
So I connected one of the drives of the RAID-1 to my PC (Gentoo Linux with kernel 5.18.0). With the OS Synology DSM 7 and a 2-disk Synology SHR you will see the following: a mdadm raid containing a LVM2, containing a btrfs file system. The raid was detected automatically and the device was /dev/md127. Also quick lvs command showed directly the logical volume with the designation vg1000 - nice! Let's set it active with lvchange -a y vg1000.
The last step would be to mount the btrfs file system. So lets do that:
mount /dev/mapper/vg1000-lv /mntWell that did not work. The only thing I got is errors of corrupt leaf. Well... I tried a lot and there was no way to get it back to work. After some tries, repair attemps and testing the other drives of the array I checked the kernel version of the NAS. A uname -a returned:
Linux i-nas-05 4.4.180+ #42218 SMP Mon Oct 18 19:17:56 CST 2021 x86_64Well. So it would perhaps be worth a try to spin up a live usb with an old linux kernel and give it a shot.
Yep, that was it: With a MX Linux 19.3_386 with kernel 4.19.0-12-686-pae everything mounted flawlessly and I could access all the data.
