In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to deploy RAID5 under Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
RAID 5 is a storage solution that combines storage performance, data security, and storage costs. RAID 5 can be understood as a compromise between RAID 0 and RAID 1. RAID 5 can provide data security for the system, but the degree of protection is lower than that of Mirror and the utilization of disk space is higher than Mirror.
I. preliminary preparation
1. At least 3 hard drives of the same capacity are required to create a RAID5
Mdadm package needs to be installed under 2.Linux.
Can be used
Rpm-qa | grep mdadm
Command to confirm that the mdadm software is installed
Second, partition the disk
1. Use the fdisk-l command to view partitions
Fdisk-l
two。 Use fdisk to partition the disk. The RAID group needs to have the same size of each partition. The default ID of the partition is 83. Use the fd command to modify the partition.
Fdisk III. Create a RAID5 group
1 > you need at least 3 hard disks of the same capacity to create a RAID5. It is recommended to use 4 hard disks of the same size, of which 3 are used as RAID5 and one is idle as a hot backup.
Mdadm-C / dev/md0-l 5-n 3-x 1 / dev/sdb [1-4]
Note:-l RAID level, here is 5, that is, the number of hard disks in the RAID5-n RAID group, and there are 3-x hot spares. This is set to 1 / dev/sdb [1-4] which hard disks are used. Here we use / dev/sdb1~/dev/sdb4 for a total of four hard disks (3 RAID5,1 blocks are built for hot spares). 2 > write RAID configuration information to the configuration file
Mdadm-detail-scan-verbose / dev/md0 > / etc/mdadm.conf
Note: Linux automatically reads / etc/mdadm.conf and configures the raid group when it starts. 3 > View RAID information a. View the details of the RAID group
Mdadm-detail / dev/md0
b. View status information for RAID groups
Cat / proc/ mdstat IV, formatted mkfs.ext4 / dev/md0 V, mount
There are two ways to mount:
Vi / etc/fstab
Add a line at the end, the format is the same as above, for example: / dev/md0 / mnt_array ext4 defaults 00 RAID disk mapping disk format default configuration indicates that even if the mount fails, it will not affect the system startup 2 > direct mount (mounting is only valid for the current runtime, and will disappear after the system restart. If you need to remain valid, use the above method)
Mount / dev/md0 / mnt_array
Thank you for reading! This is the end of the article on "how to deploy RAID5 under Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.