Linux下实现raid5磁盘阵列(2)

mkdir /database                                                           //创建挂载点

mount /dev/vgdata/lvdata /database                                        //挂载

df -h                                                                     //查看挂载情况

(umount /database

lvextend -L +500m /dev/vgdata/lvdata                                     //扩lv

fsck /dev/vgdata/lvdata                                                  //检查磁盘

resize2fs /dev/vgdata/lvdata                                             //扩文件系统                              

ext2online /dev/vgdata/lvdata)                                           //动态扩文件系统,无须umount

三.整体检测

mdadm /dev/md0 -f /dev/sdh2                                               //将/dev/sdh2标记为已损坏的设备

more /proc/mdstat                                                         //查看阵列状态

/****************************************************出现未完成****************************************************/

Personalities : [raid5]

md0 : active raid5 sdd1[2] sde1[3] sdc1[1] sdb1[4](F)

75469842 blocks level 5, 128k chunk, algorithm 2 [3/2] [U_U]

[=>...................] recovery = 8.9% (3358407/37734912) finish=1.6min speed=9382K/sec

unused devices:

/******************************************************************************************************************/

more /proc/mdstat                                                         //查看阵列状态

/****************************************************出现则完成****************************************************/

Personalities : [raid5]

md0 : active raid5 sdd1[2] sde1[0] sdc1[1] sdb1[3](F)

75469842 blocks level 5, 128k chunk, algorithm 2 [3/3] [UUU]

unused devices:

/******************************************************************************************************************/

mdadm /dev/md0 -r /dev/sdh2                                               //移除损坏的设备

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/09e5d689f21b97841e9d862fded60837.html