Mô hình đĩa:

–       Sdb và sdc: RAID-1 md0

–       Sdd và sde: RAID-1 md1

Tạo Logical volume trên md0 và md1

1.    Format đĩa

2.    Tạo raid

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

–       mdadm –create /dev/md1 -l 1 -n 2 /dev/sdd1 /dev/sde1

3.    Kiểm tra raid

–       cat /proc/mdstat

4.    Tạo file mdadmconfig

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

5.    Tạo PV

–       pvcreate /dev/md0 /dev/md1

Check lại bằng pvdisplay

6.    Tạo VG

–       vgcreate lvm-raid /dev/md0 /dev/md1

Check lại bằng vgdisplay

7.    Tạo LV

–       lvcreate –name share –size 20G lvm-raid

–       lvcreate –name backup –size 5G lvm-raid

–       lvcreate –name media –size 1G lvm-raid

8.    Tạo FS

–       mkfs.ext3 /dev/lvm-raid/share

–       mkfs.ext3 /dev/lvm-raid/backup

–       mkfs.ext3 /dev/lvm-raid/media

9.    Tạo mountpoint

–       mkdir /var/media /var/backup /var/share

10.  Mount

–       mount /dev/lvm-raid/share /var/share

–       mount /dev/lvm-raid/backup /var/backup

–       mount /dev/lvm-raid/media /var/media

11.  Edit fstab

12.  Reboot, check bằng df-h

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: Logo

You are commenting using your 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 )

Connecting to %s