再インストールしたシステムの運用が安定してきたので用意してあった2台目の500GBハードディスクを組み込んでRAID 1を構築することに。
手順は以前書いた通り。
まずは1台目のハードディスクのパーティション構成を確認
# fdisk /dev/hda
Command (m for help): p Disk /dev/hda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 1 32 257008+ 83 Linux /dev/hda2 33 64 257040 82 Linux swap / Solaris /dev/hda3 65 60801 487869952+ fd Linux raid autodetect
同じ大きさのパーティションを作り、typeをfd(Linux raid autodetect)に設定。
# fdisk /dev/hdb
Command (m for help): p Disk /dev/hdb: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hdb1 1 64 514048+ 82 Linux swap / Solaris /dev/hdb2 65 60801 487869952+ fd Linux raid autodetect
そして/dev/hdb2をhotadd。
# mdadm /dev/md0 -a /dev/hdb2
mdadm: hot added /dev/hdb2
ちゃんと動いているか確認
# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] md0 : active raid1 hdb2[2] hda3[0] 487869888 blocks [2/1] [U_] [>....................] recovery = 0.0% (56960/487869888) finish=427.9min speed=18986K/sec unused devices:
なんか7時間以上かかりそうなので、放っておいて寝る。