当前位置:网站首页>[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.
边栏推荐
- 乘云科技受邀出席2022阿里云合作伙伴大会荣获“聚力行远奖”
- Getting Started Documentation 10 Resource Mapping
- LeetCode刷题之第33题
- 专有宿主机CDH
- spark源码-任务提交流程之-1-sparkSubmit
- 网络通信及相关函数介绍
- spark算子-repartition算子
- [Paper Intensive Reading] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation (R-CNN)
- 入门文档06 向流(stream)中添加文件
- C语言入门笔记 —— 函数(1)
猜你喜欢
随机推荐
洞察互联网大趋势,读完这篇文章你就彻底了解中文域名
Getting Started Doc 08 Conditional Plugins
阿里云视频点播
不吹不黑,这的确是我看过微服务架构最好的文章!
2020,Laya最新中高级面试灵魂32问,你都知道吗?
Remembering my first CCF-A conference paper | After six rejections, my paper is finally accepted, yay!
spark算子-textFile算子
如何用UE5渲染一个可爱的茶壶屋?
LeetCode刷题之第33题
spark源码-任务提交流程之-2-YarnClusterApplication
PVE 直通硬盘到TrueNAS
C语言入门笔记 —— 分支与循环
【Day1】(超详细步骤)构建软RAID磁盘阵列
unity实现第一人称漫游(保姆级教程)
什么是全栈设计师?
论那些给得出高薪的游戏公司底气到底在哪里?
Getting Started 03 Distinguish between development and production environments ("hot update" is performed only in the production environment)
spark源码-任务提交流程之-1-sparkSubmit
浅谈遇到的小问题
每日一题-单调栈









