当前位置:网站首页>[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.
边栏推荐
猜你喜欢
【Day6】文件系统权限管理 文件特殊权限 隐藏属性
Unity物理引擎中的碰撞、角色控制器、Cloth组件(布料)、关节 Joint
什么是全栈设计师?
spark算子-map vs mapPartitions算子
UE5再次更新!扫描或手动建模面部模型可直接转为绑定好的Metahuman
Getting Started 11 Automatically add version numbers
【Day5】软硬链接 文件存储,删除,目录管理命令
乘云科技受邀出席2022阿里云合作伙伴大会荣获“聚力行远奖”
IJCAI 2022|Boundary-Guided Camouflage Object Detection Model BGNet
spark源码-RPC通信机制
随机推荐
Leetcode刷题——对链表进行插入排序
什么?CDN缓存加速只适用于加速静态内容?
函数在开发环境中的应用(简易实例)
UE5再次更新!扫描或手动建模面部模型可直接转为绑定好的Metahuman
【Day8】使用LVM扩容所涉及的命令
硬核!Cocos开发面试必备十问,让你offer拿到手软
Cocos Creator小游戏案例《棍子士兵》
入门文档11 自动添加版本号
spark算子-coalesce算子
入门文档08 条件插件
错误类型:reflection.ReflectionException: Could not set property ‘xxx‘ of ‘class ‘xxx‘ with value ‘xxx‘
spark源码-任务提交流程之-4-container中启动executor
【UiPath2022+C#】UiPath数据类型
Unity中的GetEnumerator 方法及MoveNext、Reset方法
Wireshark抓包及常用过滤方法
无影云桌面
每日一题-字典
栈的应用——力扣 20.有效的括号
游戏引擎除了开发游戏还能做什么?
什么是全栈设计师?