Linux Software RAID的rebuild速度

Posted by zuzhihui in Linux技术 on 2011/04/21 with No Comments

Linux Software RAID的rebuild速度是根据服务器负载情况自动调节的,默认的rebuild比较慢。默认的速度一般如下:

[root@x003 ~]# sysctl dev.raid.speed_limit_min
dev.raid.speed_limit_min = 1000

这个默认速度下,服务器上运行着很多VPS,Rebuild一块1T的硬盘好好几天时间:

[root@x002 ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sdb5[2] sda5[1]
965016384 blocks [2/1] [_U]
[>....................] recovery = 2.6% (25701568/965016384) finish=3506.9min speed=4461K/sec

md9 : active raid1 sdb1[2] sda1[0]
30716160 blocks [2/1] [U_]
resync=DELAYED

调高rebuild速度:

sysctl -w dev.raid.speed_limit_min=50000

过几分钟再察看,速度就好多了

[root@x002 ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sdb5[2] sda5[1]
965016384 blocks [2/1] [_U]
[>....................] recovery = 3.3% (32125440/965016384) finish=1049.2min speed=14816K/sec

md9 : active raid1 sdb1[2] sda1[0]
30716160 blocks [2/1] [U_]
resync=DELAYED

unused devices:

标签:,

Leave a Comment

Back to Top

2007-2013 © 北京瑞豪开源科技有限公司 京ICP备13004995号-2