几天前,我购买了一台新的 Synology DS220+ 和两个 4 TB 西数 Red Plus 硬盘。我创建了一个存储池和一个卷(RAID 1 /文件系统:Btrfs)。然后我将一些测试文件保存到 NAS 中。
现在我想测试一下(以防万一我需要这样做)是否可以将单个硬盘从 NAS 连接到 PC 并使用 Ubuntu 等访问数据。
我正在按照以下说明进行尝试,但不幸的是这不起作用:
https ://kb.synology.com/tr-tr/DSM/tutorial/How_can_I_recover_data_from_my_DiskStation_using_a_PC
当我运行该命令时mount
,收到错误消息“未知文件系统类型‘LVM2_member’”。
我不知道问题是否在于我从 USB 记忆棒启动 Ubuntu(版本 22.04.2);我收到诸如“update-initramfs 由于在只读媒体上运行而被禁用”之类的错误(见下文)。而且在上面的说明中,Ubuntu 是从 USB 记忆棒启动的。
这就是我所做的:
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'.
与此同时,我在 Ubuntu 版本 18.04 而不是版本 22.04.2 上进行了尝试,并且在该版本中该命令
mount
可以正常工作。我不知道为什么它不适用于较新的版本,但对我来说问题已经解决了。
非常感谢您的帮助。
该错误表明驱动器正在使用 LVM,但您正在尝试挂载 LVM 系统底层的磁盘。
尝试
挂载lvm分区。