ma series of -19-RAID mdadm

 

 

 

0 Introduction:

 

Driver: Convert the software free instructions into operations that can be completed by the corresponding machine equipment.
Each hardware device has its own small cpu, which is used to process its own hardware functions.
The general drivers are provided by the respective hardware manufacturers, otherwise, the public hardware drivers will not achieve optimal results.

Controller: Take the U disk as an example, there is a U disk interface on the motherboard, which is the USB controller, which
can convert various instructions sent by the CPU into control signals that the U disk can recognize through the driver, and then can be used in the U disk. Initiate read and write operations.

By executing the driver, the kernel controls the controller and tells the U disk that the data can be read.


The following are common hard disk formats:
IDE: 133Mbps
SATA: 300Mbps 600Mbps 6Gbps
USB3.0: 480Mbps
SCSI: 10000 15000

 

 

1 RAID concept:

 

 

Independent redundant disk arrays combine multiple disks to form an array and use them as one disk. This is RAID.
Until now, RAID has become the industry standard in many storage solutions.
The file is stored according to the sector, if it is a 2G file, the file is divided into 32M one by one under the RAID controller, and these files are stored in the corresponding RAID disk group.

Depending on the way the disk is organized, RAID has different levels. The level is the reliability of data (probability of disk damage) and a comprehensive level of storage speed. There is no difference between good and bad.


Disk mirroring: mirroring 
 the data on the two disks is exactly the same, ensuring data security, but a waste of disk space.

 

 

RAID level:

 

0: Stripe is 12345 data, store data 1 in disk 1 A, data 2 in disk 2 A, disk 3 A, and so on, if one disk is broken, the data will not be recovered.
 Performance improvement: read, Write
 redundancy (fault tolerance): No
 space utilization: nS
 at least 2 disks
1: Mirroring means that the data will be completely stored on different disks exactly the same
 Performance: write performance is reduced, read performance is improved
 Redundancy: there is
 space utilization : 1/2
 at least 2 disks
2
3
4:
5:
 Performance: read, write improved, take out 1 disk to store the machine check code, so that when one of the disks is broken, the check code and the remaining disk Data processing can restore the data
 redundancy of the lost disk : there is
 space utilization: (n-1)/n
 at least 3 blocks are required
10: first easy and then RAID For example, put 1 of 123 on two disks Do mirror1 2 on two disks do mirror2 3 do mirror3 on two disks Then do mirror1, 2, 3
 Performance performance: read and write to improve
 redundancy: there is
 space utilization: 1/2
 at least 4 pieces required

 

10 mode as shown below:

 



 

01:
 Performance: read and write to improve
 redundancy: with
 space utilization: 1/2
 requires at least 4 blocks
50:
 performance: read and write to improve
 redundancy: with
 space utilization: (n-2)/n
    At least 6
 
jbods are required: combine multiple small disks into one large disk
 Performance: no improvement
 Redundancy: no
 space utilization: 100%
 requires at least 2 blocks


With the difference between hdfs features and RAID: 1. The database copy is automatically saved. 2. If data is lost, another copy will be automatically found at the file system level without the need for hardware and RAID.

 

 

 2 mdadm array management:

 

mdadm: RAID any block device
Patterned command:
 Create a schema
 -C
 Dedicated options:
 -l: level
 -n #: number of devices
 -a {yes|no}: whether to automatically create a device file for it
 -c: CHUNK size, 2^n, default is 64K
 -x #: Specify the number of free disks
 management mode
 --add, --remove, --fail
 mdadm /dev/md# --fail /dev/sda7
 monitor mode
 -F
 growth pattern
 -G
 Assembly mode
 -A


View details of a RAID array
mdadm -D /dev/md#
 --detail
 
Stop the array:
 mdadm -S /dev/md#
 --stop

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326807786&siteId=291194637