RAID 1 LAB

|———-RAID 1——|

|Disk 1|                           |Disk 2|

Thông tin đĩa hiện tại:

– /dev/sda: Đĩa hệ thống để install hệ điều hành

– /dev/sdb: Disk 1

– /dev/sdc: Disk 2

1. Format disk 1 và disk 2

– fdisk /dev/sdb

Enter: n (tạo partition mới)

Enter: p (tạo primary partition)

Enter: 1 (tạo part số 1)

Enter (First sector default)

Enter: +20000M (Last sector: 20GB)

Enter: t (chọn partition type)

Enter: fd (linux raid auto detect)

Enter: w (write changes)

– Tương tự cho sdc

Lúc này đã có /dev/sdb1 và /dev/sdc1, dung lượng 20GB, type fd (kiểm tra lại bằng fdisk -l)

2. Tạo raid

– mdadm –create /dev/md0 -l 1 -n 2 /dev/sdb1 /dev/sdc1

3. Kiểm tra

– cat /proc/mdstat

4. Tạo file system

– mkfs.ext3 /dev/md0

5. Tạo file mdadm config:

– mdadm –detail –scan > /etc/mdadm.conf

6. Tạo mount point

– mkdir /var/data

7. Mount

– mount /dev/md0 /var/data

8. Check bằng df

– df -h

8. Add vào file fstab

/dev/md0     /var/data      ext3     default       0 0

Done

Advertisements

About dongthao

"Man does not simply exist but always decides what his existence will be, what he will become the next moment"
This entry was posted in Linux, Linux Tutorial and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s