1

A few days ago I bought a new Synology DS220+ and two 4 TB Western Digital Red Plus hard disks. I created a single storage pool and a single volume (RAID 1 / file system: Btrfs). Then I saved a few test files to the NAS.
Now I want to test – just in case I ever need to do that – if I can connect one single hard drive from the NAS to a PC and access the data e.g. with Ubuntu.

I'm trying this according to the following instructions, but unfortunately this doesn't work:
https://kb.synology.com/tr-tr/DSM/tutorial/How_can_I_recover_data_from_my_DiskStation_using_a_PC

When I run the command mount, I get the error message "unknown filesystem type 'LVM2_member'".

I don't know if the problem is that I boot Ubuntu (version 22.04.2) from a USB stick; I get errors like "update-initramfs is disabled since running on read-only media" (see below). But also in the above instructions Ubuntu is started from a USB stick.

And here is, what I did:

ubuntu@ubuntu:~$ sudo -i

root@ubuntu:~# apt-get update
Ign:1 cdrom://Ubuntu 22.04.2 LTS _Jammy Jellyfish_ - Release amd64 (20230223) jammy InRelease
Hit:2 cdrom://Ubuntu 22.04.2 LTS _Jammy Jellyfish_ - Release amd64 (20230223) jammy Release
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease               
Hit:5 http://archive.ubuntu.com/ubuntu jammy InRelease                         
Hit:6 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Reading package lists... Done

root@ubuntu:~# apt-get install -y mdadm lvm2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
lvm2 is already the newest version (2.03.11-2.1ubuntu4).
Suggested packages:
  default-mta | mail-transport-agent dracut-core
The following NEW packages will be installed:
  mdadm
0 upgraded, 1 newly installed, 0 to remove and 329 not upgraded.
Need to get 464 kB of archives.
After this operation, 1,210 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 mdadm amd64 4.2-0ubuntu2 [464 kB]
Fetched 464 kB in 0s (2,596 kB/s)
Preconfiguring packages ...
Selecting previously unselected package mdadm.
(Reading database ... 208350 files and directories currently installed.)
Preparing to unpack .../mdadm_4.2-0ubuntu2_amd64.deb ...
Unpacking mdadm (4.2-0ubuntu2) ...
Setting up mdadm (4.2-0ubuntu2) ...
Generating mdadm.conf... done.
update-initramfs is disabled since running on read-only media
/usr/sbin/grub-probe: error: failed to get canonical path of `/cow'.
Created symlink /etc/systemd/system/mdmonitor.service.wants/mdcheck_continue.timer → /lib/systemd/system/mdcheck_continue.timer.
Created symlink /etc/systemd/system/mdmonitor.service.wants/mdcheck_start.timer → /lib/systemd/system/mdcheck_start.timer.
Created symlink /etc/systemd/system/mdmonitor.service.wants/mdmonitor-oneshot.timer → /lib/systemd/system/mdmonitor-oneshot.timer.
Processing triggers for man-db (2.10.2-1) ...

root@ubuntu:~# mdadm -AsfR && vgchange -ay
mdadm: /dev/md/2 has been started with 1 drive (out of 2).
  2 logical volume(s) in volume group "vg1" now active

root@ubuntu:~# cat /proc/mdstat
Personalities : [raid1] 
md2 : active raid1 sda3[3]
      3896294208 blocks super 1.2 [2/1] [U_]
unused devices: <none>

root@ubuntu:~# lvs
  LV                    VG  Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  syno_vg_reserved_area vg1 -wi-a----- 12.00m                                                    
  volume_1              vg1 -wi-a----- <3.63t                                                    

root@ubuntu:~# mount /dev/md2 /home/ubuntu/data -o ro
mount: /home/ubuntu/data: unknown filesystem type 'LVM2_member'.
Michi
  • 55
  • 1
  • 7
  • I wonder if *update-initramfs is disabled since running on **read-only** media* may be an issue – Jaromanda X Jul 23 '23 at 05:52
  • In the meantime, I've done the Ubuntu installation on a separate hard drive, so that the read-only messages are gone. But unfortunately, I still get the same error messages with the command `mount` (see below). – Michi Jul 23 '23 at 18:36

2 Answers2

2

In the meantime I tried it with the Ubuntu version 18.04 instead of the version 22.04.2 and with this version the command mount works.
I've no idea why it doesn't work with the newer version, but for me the problem is solved.
Many thanks for all your help.

Michi
  • 55
  • 1
  • 7
0

The error suggests that the drive is using LVM but you are trying to mount the disk underlying the LVM system.

Try

  mount /dev/lv1/volume_1 /data -o ro

To mount the lvm partition.

davidgo
  • 68,623
  • 13
  • 106
  • 163
  • With this command I get: "mount: /home/ubuntu/data: special device /dev/lv1/volume_1 does not exist." – Michi Jul 23 '23 at 15:49
  • I've now also tried `mount /dev/vg1/volume_1 /home/ubuntu/data -o ro`. But then I get: "mount: /home/ubuntu/data: wrong fs type, bad option, bad superblock on /dev/mapper/vg1-volume_1, missing codepage or helper program, or other error." – Michi Jul 23 '23 at 18:28
  • I've not used BTRFS, but according to https://www.suse.com/support/kb/doc/?id=000018761 this could be a problem with the btrfs log (and following this guide may make the data mountable - but may zap it altogther. More worryingly though might be that this will cause your RAID to be out of sync so maybe not what you want to do here unless you are willing to rebuild your RAID and risk your data. After trying a mount, what does your log file say? (ie the end of the output when you type "dmesg")? – davidgo Jul 23 '23 at 21:52