保险的做法是把硬盘通过SATA挂到电脑上,不用通过硬盘盒再通过USB挂到电脑上,通过硬盘盒有可能会出现无法正确识别分区的问题。错误情况类似下面:[1]

# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.10

Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Disk /dev/sdb: 1565565872 sectors, 746.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 8EE70EA7-5A50-4036-BA6B-1423B41854E2
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 8-sector boundaries
Total free space is 3907073537 sectors (1.8 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1           65536        42008576   20.0 GiB    0700  primary
   2        42008584      1953525106   911.5 GiB   0700  primary

在虚拟机上新加硬盘,把整块群晖硬盘加入到虚拟机。

在 Ubuntu 中安装 mdadm 和 lvm2。[2][3]

再启动 Ubuntu 后,群晖硬盘上的数据分区会自动加载,但系统分区需要手动加载。

加载系统分区需要执行以下命令:[4]

mkdir /mnt/syno
mount -t ext4 /dev/sdb1 /mnt/syno

如果不确定分区号,执行以下命令查看:

lsblk

参考:

  1. Cannot access GPT disk through USB interface
  2. Howto: Mount Synology disk through Ubuntu VM
  3. How can I recover data on my Synology NAS using a PC?
  4. mount: unknown filesystem type ‘linux_raid_member’

发表评论

电子邮件地址不会被公开。 必填项已用*标注