Oracle technology: Linux builds soft raid

Source: Internet
Author: User
Tags linux

1. RAID definition

RAID, full name Redundant array of inexpensive disks, Chinese name is redundant array of inexpensive disks. RAID can be divided into soft raid and hard raid, soft raid is the software to achieve multiple hard disk redundancy. Hard raid is typically raid based on a RAID card. The former is simple in configuration and more flexible in management. For small and medium-sized Enterprises is a best choice. Hard raid often costs more. However, there is a certain advantage in performance.

2. RAID classification

RAID can be divided into the following categories, make a table to understand:

RAID 0: The fastest access speed without fault tolerance

RAID 1: Full fault-tolerant cost, low drive usage.

RAID 3: Write performance Best not multi-tasking

RAID 4: Multitasking and fault-tolerant features Parity disk drives cause performance bottlenecks

RAID 5: Multitasking and fault-tolerant writing with overhead

RAID 0+1: High speed, full fault-tolerant cost

3, Linux RAID 5 experiment detailed

Suppose I have 4 hard drives, (no condition friends can set out 4 hard drives with a virtual machine). The/DEV/SDA/DEV/SDB/DEV/SDC/DEV/SDD are respectively.

(1) The first thing to do is to partition.

[Root@localhost/]# FDISK/DEV/SDA

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF Disklabel

Building a new DOS Disklabel. Changes would remain in memory only,

Until you decide to write them. After that, the course, the previous

Content won ' t be recoverable.

Warning:invalid flag 0x0000 of partition table 4 is corrected by W (rite)

Command (M for help): N #按n创建新分区

Command Action

E Extended

P primary partition (1-4) #输入p Select Create Primary partition

P

Partition number (1-4): 1 #输入 1 Create the first primary partition

First cylinder (1-130, default 1): #直接回车, select partition Start cylinder This is starting from 1.

Using Default value 1

Last cylinder or +size or +sizem or +sizek (1-102, default 130):

Using Default Value 130

Command (M for help): W #然后输入w写盘

The partition table has been altered!

Calling IOCTL () to re-read partition table.

Syncing disks.

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

Other partitions do all of this to separate out a district. The following are the total partition information:

[Root@localhost/]# Fdisk-l

disk/dev/sda:1073 MB, 1073741824 bytes

255 heads, Sectors/track, 130 cylinders

Units = Cylinders of 16065 * 8225280 bytes

Device Boot Start End Blocks Id System

/DEV/SDA1 1 130 1044193+ Linux

disk/dev/sdb:1073 MB, 1073741824 bytes

255 heads, Sectors/track, 130 cylinders

Units = Cylinders of 16065 * 8225280 bytes

Device Boot Start End Blocks Id System

/DEV/SDB1 1 130 1044193+ Linux

disk/dev/sdc:1073 MB, 1073741824 bytes

255 heads, Sectors/track, 130 cylinders

Units = Cylinders of 16065 * 8225280 bytes

Device Boot Start End Blocks Id System

/DEV/SDC1 1 130 1044193+ Linux

disk/dev/sdd:1073 MB, 1073741824 bytes

255 heads, Sectors/track, 130 cylinders

Units = Cylinders of 16065 * 8225280 bytes

Device Boot Start End Blocks Id System

/DEV/SDD1 1 130 1044193+ Linux

(2) The next step is to create a raid.

[Root@localhost ~]# mdadm--create/dev/md0--level=5--raid-devices=3--spare-devices=1/dev/sd[a-d]1 # It means to create a raid device named Md0 with a level of RAID 5

Mdadm:array/dev/md0 started. Use 3 devices to set up raid, spare one spare.

OK, initially set up a raid, let's look at the specific situation.

[Root@localhost ~]# Mdadm--detail/dev/md0

/DEV/MD0:

version:00.90.01

Creation Time:fri Aug 3 13:53:34 2007

Raid LEVEL:RAID5

Array size:2088192 (2039.25 MiB 2138.31 MB)

Device size:1044096 (1019.63 MiB 1069.15 MB)

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.