Original REDHATAS5LinuxRAID implementation method-graphic details

Source: Internet
Author: User
Tags apache php
Original REDHATAS5LinuxRAID implementation method-graphic details-general Linux technology-Linux technology and application information, the following is a detailed description. I am new here. This is the first post. Hey, hope you can support it ~
If you think it is good, thank you ~: 0) 1 (6) m: B

I have been learning how to set up mysql apache php in red hat AS5 linux. I have read some documents. I hope experienced experts can give me some advice. Thank you!

In Linux, RAID implementation methods are often asked how to build an Array in linux. Before getting started, let's take a look at what RAID is: RAID is a redundant Array of lnexpensive DISKS in English, the Chinese name "independent Disk redundancy array" was defined in an article by Patterson, Gibson, and katz at the University of California's Berkley branch in 1987. To put it simply, RAID is a hard disk group that combines multiple independent hard disks in different ways. It provides technologies with higher storage read/write performance and data redundancy than a single hard disk. Commonly used RAID levels include RAID 0 ~ RAID7 has its own advantages and disadvantages. What we need to establish is RAID0. RAID0, also known as data partitioning, divides data into several small pieces of equal size and writes the data to different hard disks on the array, this technology, also known as "Stripping" (Data striping), distributes data on multiple disks and performs operations on each disk in parallel during read/write operations, therefore, it has a high data transmission rate, but it is not redundant. The created RAID capacity is equal to the sum of the disk capacity. For more information about RAID, see related documents.

Example: I use an EYOO LINUX game server disk array technology Hard Disk: 80 GB, 160 GB, three blocks ----------------------- we load the system into 80 GB hard disk network game is 320 GB, that is to say, we use two GB disks to store the remaining GB disks of the array for single-host games ------------------------. We use two methods to do the first: Configure RAID in the graphic configuration on the partition interface, it is more suitable for friends who are not familiar with linux to connect to the hard disk first, confirm that the hard disk can be correctly identified in the BIOS, set the optical drive to start, and put the first RADHAT AS5 disc for linux installation. The general method is the gold custom partition interface. [Img = 600,448] http://www.fwboy.cn/upload_files/other/1.jpg [/Img] Three hard disks are shown in. The hda is an 80 GB system disk, hdb, and hdd are two GB hard disks (we aim to group these two disks) the 80 GB system disk partition is based on the regular requirements. Here we will not explain how to make two GB hard disks into an array disk. Step 1: Convert the disk file type to software raid [img = 600,445] http://www.fwboy.cn/upload_files/other/2.jpg [/Img] [img = 600,553] http://www.fwboy.cn/upload_files/other/3.jpg [/Img] select another hard disk HDD in the same way. Step 2: After converting the file systems of the two disks to software RAID, the array is created. [Img = 600,446] http://www.fwboy.cn/upload_files/other/4.jpg [/Img] [img = 600,489] http://www.fwboy.cn/upload_files/other/5.jpg [/Img] Step 3: Click OK to bring up the window shown in. Enter a mount point. Because it is an online game disk, enter/game and click OK, the array is created. [Img = 600,513] http://www.fwboy.cn/upload_files/other/6.jpg [/Img] [img = 600,448] http://www.fwboy.cn/upload_files/other/7.jpg [/Img] creating Soft RAID on the graphic interface is simple and convenient. Then proceed to the next step to complete linux installation. After the system is installed. The ROOT user enters the system, checks the disk mounting status, and finds that the array has been started and automatically mounted. [Img = 600,124] http://www.fwboy.cn/upload_files/other/8.jpg [/Img] ------------------------------------------------------------------ Method 2: Create a RAID method using commands linux provides a very convenient partition graphic interface to configure RAID, but it must be installed in the system. Can I create a RAID without re-installing the new system? The answer is yes. There is a tool mdadm in RH5, which can be used to conveniently implement RAID. Raidtools was used in early linux, but the maintenance was difficult and the performance was limited. RH4 was no longer supported at the beginning. Let's take a step-by-step look at the implementation process from the above forces. Step 1: log on to the system as a ROOR user and partition the disk of the array to be created. Use fdisk-l to check the current hard disk partition. The device numbers of the two hard disks to be created in raid are as follows: hdb and hdd partition the hard disk respectively: # fdisk/dev/hdb press enter and perform partitioning as instructed [img = 600,265] http://www.fwboy.cn/upload_files/other/9.jpg [/Img] Step 2: create a raid array # mdadm -- create -- verbose/dev/md0 -- level = 0 -- raid-devices = 2/dev/hdb1/dev/hdd1: -- create array mode/dev/md0 Array Device name -- level array mode. Here, the information is displayed for the raid 0 -- raid-devices disk quantity system that creates the array. ------- [img = 600,169] http://www.fwboy.cn/upload_files/other/10.jpg [/Img] [img = 600,286] http://www.fwboy.cn/upload_files/other/11.jpg [/Img] ---------------------------------------- Step 3: Check the RAID array. The boy creates www.fwboy.cn to view the/proc/mdstat file, display the current RAID status # cat/paros/mdstat System Displays ----------- [img = 600,142] http://www.fwboy.cn/upload_files/other/12.jpg [/Img] can also view more detailed information, including the Creation Time, size, and last update time. # Mdadm -- detail/dev/md0 system display --- [img = 600,382] http://www.fwboy.cn/upload_files/other/13.jpg [/Img] Step 4: edit the array configuration file to complete the final settings. The default raid configuration file is in/etc/mdadm. conf. Scan all arrays in the system: # mdadm -- detail -- scan the scan result shows the name of the array column, the pattern and the UUID of the array. Each disk in the array has this UUID, prove that they belong to an array. Add information about the array to the configuration file. For more information, see # echo "DEVICE partitions">/etc/mdadm. conf # mdadm -- detail -- scan>/etc/mdadm. the command above conf writes the relevant information directly to mdadm. conf. To enable the array to automatically start with the system, you also need to go to/etc/rc. d/rc. add a command in local: # vi/etc/rc. d/rc. add a command "mdadm-As/dev/md0" at the end of the local command to complete the establishment of raid. To use an array, format it first: mkfs. ext3/dev/md0, edit the fstab file, add a mount point, and enable the raid to be automatically mounted to game when it is started. note: After the above two methods are used to create a soft raid, the data cannot use a ghost disk. You need to use the cp command in linux to copy the data. Actually, the CP speed is faster than that in GHOST: first, connect the online game disk with data and temporarily mount it to a directory. Assume that the device Number of the online game disk is/dev/sda1. temporary mount: mount/dev/sda1/mnt (you can also create a directory and mount it as needed) 2. enter the/mnt Directory: cd/mnt 3. perform data copy: cp *-av/game so that you can complete RAID. I hope you can understand it and help the people you need.

PS: Source of this Article Http://www.fwboy.cn/bencandy.php? Fid = 11 & id = 1420

[ This post was last edited by non-dancing boys]
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.