当前位置:网站首页>[Day1] (Super detailed steps) Build a soft RAID disk array
[Day1] (Super detailed steps) Build a soft RAID disk array
2022-08-05 06:09:00 【Mingli Yui】
Table of Contents
(2) Prepare for RAIDPartitions of the array
(4) Create and mount a file system (temporary mount)
First add 4 SCSI hard disks to the linux server, use the mdadm software package to build a RAID5 disk array to improve the performance and reliability of disk storage.
First, build a disk array
(1) Install the mdadm tool
In the CentOS7.x system, the mdadm tool is provided by the mdadm-3.4-14.el7.x86_64 package. Execute the rpm-qa | grep mdadm command to check whether the mdadm tool is installed in the system.If the mdadm tool is not installed in the system, you can use RPM or YUM to install yum install mdadm -y
(2) Prepare partitions for RAID arrays
Add 4 SCSI hard drives to the Linux server.Use the fdisk tool to divide a 2GB partition, according to /dev/sdc1, /dev/sdd1, /dev/sde1, /dev/sdf1. (Because I have added a disk (sdb) before, and then add a disk tofrom sdc)
(How to add disk and disk partition in my previous blog)
(3) Create RAID device
Use the mdadm command to create a RAID, execute the following command to create a RAID5 named md0.
[[email protected] ~]# mdadm -Cv /dev/md0 -a yes -n4 -l5 /dev/sd[cdef]1
The functions of the parameters used in the above commands are as follows.
-C: Equivalent to create, which means new;
-v: Display the information during the creation process; /dev/md0: The name of the created RAID5;
-a: --auto, which means to inform mdadm whether to create a device file and assign an unused minor device number, followed by yes to automatically create a device file if it does not exist;
-n: Specify several hard disks to create RAID, n4 means use 4 hard disks to create RAID;
-l: Specify the RAID level, l5 means create RAID5; /dev/sd[bcde]1: Specify four disk partitions.View RAID5 creation results.
(4) Create and mount a file system (temporary mount)
[[email protected] ~]# mkfs -t xfs /dev/md0
[[email protected] ~]# mkdir /raidme
[[email protected] ~]# mount /dev/md0 /raidme/
[[email protected] ~]# df -hT
From the value in the result of the above df -hT command /dev/md0 has a capacity of 6G.4 pieces of 2G disk should be 8G, why the capacity only shows 6G?This is the characteristic of RAID5, and the part for storing parity data is not displayed.
边栏推荐
猜你喜欢
随机推荐
UE4动画雨滴材质制作教程
dsf5.0新建页面访问时重定向到首页的问题
D45_摄像机组件Camera
专有宿主机CDH
每日一题-无重复字符的最长子串-0712
硬盘分区和永久挂载
Wireshark抓包及常用过滤方法
【3D模型教程】ZBrush如何表现皮肤纹理?
入门文档11 自动添加版本号
spark源码-任务提交流程之-1-sparkSubmit
入门文档01 series按顺序执行
Unity3D中的ref、out、Params三种参数的使用
云游戏未来展望
spark源码-RPC通信机制
Unity常用模块设计 : Unity游戏排行榜的制作与优化
一个小时教你如何掌握ts基础
ROS视频教程
Cocos Creator小游戏案例《棍子士兵》
D39_欧拉角与四元数
腾讯云云函数SCF—入门须知