The Linux disk array is used to protect system data. Here we will start with the disk array, and then detail how to configure the Linux disk array on the Linux system. I believe that after reading this article, you will certainly have a lot of GAINS. I hope this article will teach you more things.
Disk Array configuration: Role: Prevent data loss
RAID: Redundant Array:
Save multiple copies of data simultaneously: image:
Saves only one copy of the data), saves some additional information, and uses this information to restore the source data.
RAID1: Image volume
RAID5: Strip volume with parity check information
RAID1: 2 disks with 50% Utilization
RAID5 requires at least 3 disks, disk utilization N-1)/N
It is best to use the same specification as the hard disk in the disk array, and the capacity should be the same
The tool used is MDADM.
The role of the mdadm. conf file: controls that a configured RAID device can be automatically generated when the system starts.
Echo "DEVICE/dev/hd * [0-9]/dev/sd * [0-9]">/etc/mdadm. conf
Mdadm -- detail -- scan>/etc/mdadm. conf
Partition: FDISK/DEV/SDG
Create RAID:
Mdadm -- create/dev/md0 -- level = 1 -- raid-devices = 2/dev/sdg [56]
View RAID status: cat/proc/mdstat
Format the RAID device: MKFS-T EXT3/DEV/MD0
Create directory: MKDIR-P/DISK/MD0
Load: MOUTN/DEV/MD0/DISK/MD0
Run the command to generate the MDADM. CONF file.
The configuration of the Linux disk array is completed here. There may be some problems. Let's also say:
Configure Automatic loading upon startup, making it difficult to restart
Vi w. c
- #include "stdio.h"
- main()
- {
- printf("hehe\n");
- }
Compile command: gcc-o w. o w. c
Yast2
- Introduction to the method for determining Linux blacklist
- Add hard disks for Linux in virtual machines
- Solve Linux root password retrieval
- 10 new Linux knowledge points
- Detailed introduction to the use of Linux redirection