两个相同的硬盘挂载哪个?

两个相同的硬盘挂载哪个?

我订购了新的 Debian 网络服务器,它有 2 个硬盘。我假设其中一个应该分区并挂载。问题是我无法确定哪一个应该分区和挂载,哪一个有所有的 Ubuntu 文件。以下是几个命令的结果,我无法得到答案,也许是由于对 Ubuntu 缺乏了解。

# lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda       8:0    0   477G  0 disk
├─sda1    8:1    0    32G  0 part
│ └─md0   9:0    0    32G  0 raid1 [SWAP]
├─sda2    8:2    0   512M  0 part
│ └─md1   9:1    0 511.4M  0 raid1 /boot
└─sda3    8:3    0 444.4G  0 part
  └─md2   9:2    0 444.3G  0 raid1 /
sdb       8:16   0   477G  0 disk
├─sdb1    8:17   0    32G  0 part
│ └─md0   9:0    0    32G  0 raid1 [SWAP]
├─sdb2    8:18   0   512M  0 part
│ └─md1   9:1    0 511.4M  0 raid1 /boot
└─sdb3    8:19   0 444.4G  0 part
  └─md2   9:2    0 444.3G  0 raid1 /


# fdisk -l

Disk /dev/sdb: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0ba4900f

Device     Boot    Start        End   Sectors   Size Id Type
/dev/sdb1           2048   67110911  67108864    32G fd Linux raid autodetect
/dev/sdb2       67110912   68159487   1048576   512M fd Linux raid autodetect
/dev/sdb3       68159488 1000213167 932053680 444.4G fd Linux raid autodetect

Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x31fd01ce

Device     Boot    Start        End   Sectors   Size Id Type
/dev/sda1           2048   67110911  67108864    32G fd Linux raid autodetect
/dev/sda2       67110912   68159487   1048576   512M fd Linux raid autodetect
/dev/sda3       68159488 1000213167 932053680 444.4G fd Linux raid autodetect

Disk /dev/md0: 32 GiB, 34326183936 bytes, 67043328 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md1: 511.4 MiB, 536281088 bytes, 1047424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md2: 444.3 GiB, 477077241856 bytes, 931791488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


# blkid
/dev/sdb1: UUID="4374a69b-c5ca-ceee-bfd3-3df61d255a13" UUID_SUB="f1ca2293-d87d-83b8-dad9-aba968c25d0a" LABEL="rescue:0" TYPE="linux_raid_member" PARTUUID="0ba4900f-01"
/dev/sdb2: UUID="4b93d869-e581-7187-70ca-c4f9e7668ed5" UUID_SUB="6921e275-a6f3-0e5f-52c6-37520265266e" LABEL="rescue:1" TYPE="linux_raid_member" PARTUUID="0ba4900f-02"
/dev/sdb3: UUID="10c95f64-534c-e940-f016-77851637282b" UUID_SUB="003339b6-34c6-a11c-0f95-722934e2cd25" LABEL="rescue:2" TYPE="linux_raid_member" PARTUUID="0ba4900f-03"
/dev/sda1: UUID="4374a69b-c5ca-ceee-bfd3-3df61d255a13" UUID_SUB="865a9479-0077-b93e-fde5-62b4427eed93" LABEL="rescue:0" TYPE="linux_raid_member" PARTUUID="31fd01ce-01"
/dev/sda2: UUID="4b93d869-e581-7187-70ca-c4f9e7668ed5" UUID_SUB="fade36f5-1a58-9645-4c8e-d3bbbadb2d4d" LABEL="rescue:1" TYPE="linux_raid_member" PARTUUID="31fd01ce-02"
/dev/sda3: UUID="10c95f64-534c-e940-f016-77851637282b" UUID_SUB="75c16690-bce6-0f66-1a6f-4819b70fb1bd" LABEL="rescue:2" TYPE="linux_raid_member" PARTUUID="31fd01ce-03"
/dev/md0: UUID="2317882d-d15e-4879-8eab-8d37b77b717e" TYPE="swap"
/dev/md1: UUID="6ef84344-8aa2-4807-9486-4c98ab3aeffa" TYPE="ext3"
/dev/md2: UUID="a710dcc5-e25f-452b-bffd-486bb9eba812" TYPE="ext4"

答案1

两者同时安装。这是因为它们都是单个 RAID1 磁盘阵列的一部分,该阵列被引用为用于存储磁盘数据(用于、交换空间等)/dev/md{0,1,2}的实际“设备”的实际“分区”。/boot/

这是一个使用mdadm或类似软件的设置,将两个驱动器组合在一起作为基于软件的 RAID1 阵列的一部分。这就是您在fdisk -l“Linux raid autodetect”文件系统类型中看到的原因。

由于 RAID1 对映射磁盘空间的限制,这两个磁盘是“相同的”——您需要两个相同的磁盘才能获得真正的 RAID1,这就是您在这里所拥有的。(虽然这不是真的RAID 是在硬件级别使用 RAID 控制器完成的,这是一个由软件驱动的 RAID 阵列,可实现相同类型的设置。

相关内容