我有一台配备 4 个硬盘的服务器,大小为 4 To(3.7 TiB)。
我首先在每个驱动器上创建了一个类型为“fd”(Linux Raid Autodetect)的分区。
然后,我使用 mdadm 配置了 RAID 10,命令如下:
mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
由于每个驱动器有 4 个 To,我预计 Raid 10 的 To 为 8,但看起来 Raid 大约为 4To,如下所示:
$> mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Mon Jun 1 12:38:03 2020
Raid Level : raid10
Array Size : 4294700032 (4095.75 GiB 4397.77 GB)
Used Dev Size : 2147350016 (2047.87 GiB 2198.89 GB)
Raid Devices : 4
Total Devices : 4
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Tue Jun 2 07:36:34 2020
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Layout : near=2
Chunk Size : 512K
Consistency Policy : bitmap
Name : storage.infra.improvmx.com:0 (local to host storage.infra.improvmx.com)
UUID : 2c13947e:0003bac1:cf35004e:26ec0d9f
Events : 20932
Number Major Minor RaidDevice State
0 8 1 0 active sync set-A /dev/sda1
1 8 17 1 active sync set-B /dev/sdb1
2 8 33 2 active sync set-A /dev/sdc1
3 8 49 3 active sync set-B /dev/sdd1
这是 /dev/sda 的详细信息:
$> mdadm --examine /dev/sda1
/dev/sda1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : 2c13947e:0003bac1:cf35004e:26ec0d9f
Name : storage.infra.improvmx.com:0 (local to host storage.infra.improvmx.com)
Creation Time : Mon Jun 1 12:38:03 2020
Raid Level : raid10
Raid Devices : 4
Avail Dev Size : 4294701055 (2047.87 GiB 2198.89 GB)
Array Size : 4294700032 (4095.75 GiB 4397.77 GB)
Used Dev Size : 4294700032 (2047.87 GiB 2198.89 GB)
Data Offset : 264192 sectors
Super Offset : 8 sectors
Unused Space : before=264112 sectors, after=1023 sectors
State : clean
Device UUID : ddcf2074:533602a9:d1f96dfa:1680da8e
Internal Bitmap : 8 sectors from superblock
Update Time : Tue Jun 2 07:37:39 2020
Bad Block Log : 512 entries available at offset 32 sectors
Checksum : c5230c1c - correct
Events : 20931
Layout : near=2
Chunk Size : 512K
Device Role : Active device 0
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdb1:
$> mdadm --examine /dev/sdb1
/dev/sdb1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : 2c13947e:0003bac1:cf35004e:26ec0d9f
Name : storage.infra.improvmx.com:0 (local to host storage.infra.improvmx.com)
Creation Time : Mon Jun 1 12:38:03 2020
Raid Level : raid10
Raid Devices : 4
Avail Dev Size : 4294701055 (2047.87 GiB 2198.89 GB)
Array Size : 4294700032 (4095.75 GiB 4397.77 GB)
Used Dev Size : 4294700032 (2047.87 GiB 2198.89 GB)
Data Offset : 264192 sectors
Super Offset : 8 sectors
Unused Space : before=264112 sectors, after=1023 sectors
State : active
Device UUID : e8a6dc07:e88c8b49:29515d45:de406876
Internal Bitmap : 8 sectors from superblock
Update Time : Tue Jun 2 07:38:10 2020
Bad Block Log : 512 entries available at offset 32 sectors
Checksum : 2be551fc - correct
Events : 20932
Layout : near=2
Chunk Size : 512K
Device Role : Active device 1
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdc1
$> mdadm --examine /dev/sdc1
/dev/sdc1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : 2c13947e:0003bac1:cf35004e:26ec0d9f
Name : storage.infra.improvmx.com:0 (local to host storage.infra.improvmx.com)
Creation Time : Mon Jun 1 12:38:03 2020
Raid Level : raid10
Raid Devices : 4
Avail Dev Size : 4294701055 (2047.87 GiB 2198.89 GB)
Array Size : 4294700032 (4095.75 GiB 4397.77 GB)
Used Dev Size : 4294700032 (2047.87 GiB 2198.89 GB)
Data Offset : 264192 sectors
Super Offset : 8 sectors
Unused Space : before=264112 sectors, after=1023 sectors
State : active
Device UUID : a9801a8e:62d9f8e6:2c94777f:150d9837
Internal Bitmap : 8 sectors from superblock
Update Time : Tue Jun 2 07:38:49 2020
Bad Block Log : 512 entries available at offset 32 sectors
Checksum : 4ada879a - correct
Events : 20932
Layout : near=2
Chunk Size : 512K
Device Role : Active device 2
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
和 /dev/sdd1 :
$> mdadm --examine /dev/sdd1
/dev/sdd1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : 2c13947e:0003bac1:cf35004e:26ec0d9f
Name : storage.infra.improvmx.com:0 (local to host storage.infra.improvmx.com)
Creation Time : Mon Jun 1 12:38:03 2020
Raid Level : raid10
Raid Devices : 4
Avail Dev Size : 4294701055 (2047.87 GiB 2198.89 GB)
Array Size : 4294700032 (4095.75 GiB 4397.77 GB)
Used Dev Size : 4294700032 (2047.87 GiB 2198.89 GB)
Data Offset : 264192 sectors
Super Offset : 8 sectors
Unused Space : before=264112 sectors, after=1023 sectors
State : clean
Device UUID : 4c67f6e4:5563c402:4f4bd249:157f8aa4
Internal Bitmap : 8 sectors from superblock
Update Time : Tue Jun 2 07:39:21 2020
Bad Block Log : 512 entries available at offset 32 sectors
Checksum : f4cf2172 - correct
Events : 20931
Layout : near=2
Chunk Size : 512K
Device Role : Active device 3
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
我尝试使用 e2fsck,然后使用 resizefs,但无济于事。我还重启过,但什么也没改变。
你知道发生了什么吗?我该怎么办?
提前致谢。
答案1
问题在于分区的大小。
您表示您使用了 fdisk。fdisk 仅支持 MBR,其限制为 2TB 多一点。
解决方案是删除 RAID10,使用 gdisk 或 gparted 等工具重新分区磁盘。或者,如果您不从这些磁盘中的任何一个启动,您可以简单地使用整个磁盘而不是分区,例如 /dev/sda 而不是 /dev/sda1