我有一个包含 4 个磁盘的 RAID 10 配置阵列:
root@backup:~# mdadm --detail /dev/md127
/dev/md127:
Version : 1.2
Creation Time : Mon Feb 23 16:01:29 2015
Raid Level : raid10
Array Size : 7813774336 (7451.80 GiB 8001.30 GB)
Used Dev Size : 3906887168 (3725.90 GiB 4000.65 GB)
Raid Devices : 4
Total Devices : 4
Persistence : Superblock is persistent
Update Time : Tue Feb 24 11:45:12 2015
State : active, resyncing
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Layout : near=2
Chunk Size : 512K
Resync Status : 10% complete
Name : backup:0 (local to host backup)
UUID : 8ca2df76:fc340771:56daf467:973de253
Events : 34
Number Major Minor RaidDevice State
0 8 16 0 active sync /dev/sdb
1 8 32 1 active sync /dev/sdc
2 8 48 2 active sync /dev/sdd
3 8 64 3 active sync /dev/sde
该卷放入 lvm 设备中,并使用 lvm 映射到逻辑卷
root@backup:~# pvs
PV VG Fmt Attr PSize PFree
/dev/md127 storage lvm2 a-- 7.28t 0
root@backup:~# lvs
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
root backup-vg -wi-ao--- 95.14g
swap_1 backup-vg -wi-ao--- 15.87g
diskbackup storage -wi-a---- 7.28t
该阵列当前正在进行初始同步:
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : active raid10 sde[3] sdc[1] sdd[2] sdb[0]
7813774336 blocks super 1.2 512K chunks 2 near-copies [4/4] [UUUU]
[==>..................] resync = 11.4% (891766016/7813774336) finish=335.0min speed=344363K/sec
现在,一旦我挂载逻辑卷,几分钟后速度就会从大约 350mb/秒急剧下降到 60mb/秒:
root@backup:~# df
/dev/mapper/storage-diskbackup 7752074548 51360 7361318244 1% /diskbackup
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : active raid10 sde[3] sdc[1] sdd[2] sdb[0]
7813774336 blocks super 1.2 512K chunks 2 near-copies [4/4] [UUUU]
[==>..................] resync = 11.8% (929634496/7813774336) finish=1780.1min speed=64454K/sec
如果我重新启动服务器并使用 fstab 中的文件系统自动挂载它,同步过程的运行速度会更慢,达到 1500 KB/秒
有什么线索吗?
答案1
我找到了原因。EXT4 正在填充 inode 列表,因为它是一个新创建的文件系统,这导致重建速度下降。