Article Title: Use mdadm to configure RAID in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
You should also know the importance of backup. However, most people know that backup is very important, but we have not backed up the data as many as that.
Currently, there are multiple backup solutions on the market, most of which adopt snapshot policies. In other words, most systems can only restore to the status of the last backup when data is restored. A few solutions provide real-time backup capabilities.
RAID, the Redundant Array of Independent Disks or the Redundant Array of cheap disks, is a solution that fully keeps the system updated and backed up. RAID has multiple additional features, allowing a simple RAID device to maintain multiple data copies in real time.
RAID uses two or more disks with the same capacity to form an array (or a group ). Then, it converts these multiple storage devices into a "meta device" used by the system ".
Writing data to this meta device means that the data is written to each disk at the same time. Therefore, when a disk in the array is incorrect, data in other disks can still be saved.
Of course, RAID cannot replace an instant backup tool with good performance, but it can prevent you from having to recover data a week ago or even a month ago, when your hard disk fails. However, RAID cannot help you retrieve accidentally deleted files.
RAID costs are low, and the operating system kernel is also supported. All you need to do is buy two identical hard disks and divide them into partitions of the same size. Then you can download the mdadm tool from the website to create and manage RAID arrays.
Run the following command to create your first array on the disk:
# Modprobemd
# Mdadm -- create -- verbose/dev/md0 -- level = 1 -- raid-devices = 2/dev/hda1/dev/hde1
The above command creates a metadevice (/dev/md0) and maps it to two physical disks (/dev/hda1 and/dev/hde1 ). This RAID array is called RAID 1, that is, the direct image mode. After the partition is created, You Can format it and operate it like other partitions.
RAID does not require any configuration files. The RAID array takes effect immediately when the system is started. Therefore, you can perform any operations on RAID devices like other physical partitions.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service