Build a linux system on a soft disk array (soft RAID)

Source: Internet
Author: User

A new computer is equipped with a dual system. windows is used to play games and linux is used to write code. I bought two dedicated 1 TB hard disks to build RAID 0 and use parallel I/O to improve computer performance.

Choose the motherboard when deliberately selected to support RAID motherboard, msi B85-G43 GAMING, can use msi super raid technology, but after buying found that the driver of this thing is exe program, huh, the main board supports only pseudo raid and can only be used in windows. If you want to use raid in windows, you still have to give up using raid. After all, it is just a casual system. In linux, performance is pursued, therefore, we use soft RAID in linux.

 

 

FirstFirst, install windows 8 on the first disk, and use the GB primary partition as the C disk. The remaining part of the hard disk will not move. Wait until the system is installed and then plan the hard disk.

After the system is installed, use MiniTool Partition Wizard Home Edition 7.0 to plan the hard disk. Directly, which will be explained later.

 

 

A total of 1.86 TB,

Windows:

GB system partition, primary Partition

231.5g game Installation

Download files GB

G download game

GB Software Installation

150G Tool

Shared Hard Disk:

GB documentation

331.5g various music, movies, pictures

Linux: use the latest fedora20

300 M boot partition, primary partition, no raid, because grub2 does not support raid, so boot is separately divided

300 M boot backup partition, primary partition, backup a boot partition, you can use this partition to boot in case of an accident

3.6 GB swap partition, swap0 + swap1, each 1.8 GB, distributed on two hard disks

Mount 20 GB to/, sys0 + sys1, each 10 GB

50G/usr, usr0 + usr1, each 25G

25G/home, home0 + home1, each 12.5G

50G/var, var0 + var1, each 25G

20G/opt, opt0 + opt1, each 10G

230.8G/data, data0 + data1, each 115.4G, used to store various downloaded software, compressed packages, virtual machines

Now, the partitioning scheme is developed. MiniTool Partition Wizard separates windows and converts the GB of linux into an ext4 file system according to the preceding Partition plan format, next we will start to use live cd to install the system ~

 

InInstall fedora live cd on a USB flash disk

Since the installation program of fedora does not have the option to directly select RAID when partitioning the disk, I use the console for RAID.

The tool used here is mdadm.

First, use su root to switch to the root user and use fdisk-l to view the current partition status.

    

      

    

      

 

We can see that the current/dev/sda3 and/dev/sdb1 are boot and bootbak, respectively.

/Dev/sda5-11 are the same size as/dev/sdb5-11, so this part is the hard disk we use for RAID

      

Create a swap Partition

$ Mdadm-Cv/dev/md0-l0-n2/dev/sd {a, B}/dev/md0, otherwise, the md0 hard disk cannot be seen in the installer. The specific reason is unknown.


$ Mkfs. ext4/dev/md0

According to the above statement, the remaining partitions are also made into RAID partitions, restart the system once, and enter the live cd installation page again. These RAID hard disk partitions can be seen during hard disk partitioning.

Select a partition, fill in the mount point in the details on the right, Click Re-partition, select ext4 or swap, and then click Update settings. After the installation, click Start to install the system, and everything will be done properly.

 

After the system is installed, use df-h to view

  

 

Use cat/proc/mdstat to view the running status of the RAID Partition

  

 

Finally, let's test the speed of RAID0.

First install the hdparm test tool, yum install hdparm. x86_64

Use the hdparm-tT device name to test/dev/sda and/dev/md0 respectively. The test results are as follows:

  

 

RAID0's speed is nearly doubled, with a very good score ~~

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.