Linux   « Install with Software Raid | HOME | HTML <meta> tag »

 ■ Software Raid

How to install Software Raid

Software Raid1 (Mirroring)をインストール時に構築しても、ブートローダ(grub)はディスク1には書き込まれるけど、ディスク2には書き込まれない。(ブートローダはMBR = master boot record に書き込まれる)
この状態だと、ディスク1にトラブルがあった時、ディスク2のみでの起動は不可能。
そこで、ディスク2に手動でgrubをインストール。

1, Check /boot directory
# df

then you know where /boot is located. (whether /boot is included in / directory or not.)
In almost cases, /boot is /dev/md0

2, Check which physical disk consists of /dev/md0
# cat /proc/mdstat

then you know /dev/md0 consists of /dev/sda1 and /dev/sdb1
/dev/sda1 is disk1.
/dev/sdb1 is disk2.

3, setup grub
# grub
> device (hd0) /dev/sdb
> root (hd0,0)
> install /grub/stage1 (hd0) /grub/stage2 p /grub/grub.conf
> quit

4, Check /ect/raidtab
Raid does not work well without this file.
If nothing in the system, create manually.

raiddev /dev/md0
raid-level 1
nr-raid-disks 2
chunk-size 256
persistent-superblock 1
nr-spare-disks 0
device /dev/sda1
raid-disk 0
device /dev/sdb1
raid-disk 1

and mention all md* like above.


Synchronize disk1 and 2

# raidhotadd /dev/md0 /dev/sdb1
Synchronize sdb1 to sda1

or (It depends on Linux distribution and version.)

# mdadm --add /dev/md0 /dev/sdb1
Run for all drive which wants to synchronize.


Check raid status

# cat /proc/mdstat
# cat /etc/raidtab


===================
reference
http://www.miraclelinux.com/technet/faq/data/00080.html

投稿者 tomopugh : 2007年03月06日 11:27

Comment

Please comment !




Save the info?


  (Please don't click on "post" twice. It takes time a bit to change to the next screen!!)