raid5
  
  amd64 の場合
       netboot を設定しておく
      sysinst
      RAID 区画を追加
      disklabel を写す
      raid5 の設定

Last Update: "2014/04/06 19:16:56 makoto"

amd64 の場合

http://www.ki.nu/~makoto/diary/2008/04/23/ を見て、設定した(2008/12/30)。
netboot を設定しておく
tftp/bootp/nfs のサーバが設定・利用出来る場合、 CDROM を書かなくて良いので、netboot が簡単で良い。

今回は mirror-status の中の netbsd-5 の中から netbsd-5/200812270000Z を使った。

sysinst
sysinst では
  • / と swap だけを設定するとして
  • X11 も入れて Full install をするとして
  • FTP を使うとした場合
には、/ に 850MB 程度 必要となる。それで 1 GB とした。
RAID 区画を追加
disklabel -i /dev/wd0 で編集。値は別途計算しておく
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   2048256        63     4.2BSD   1024  8192     0  # (Cyl.      0*-   2032*)
 b:   2048256   2048319       swap                     # (Cyl.   2032*-   4064*)
 c: 488397105        63     unused      0     0        # (Cyl.      0*- 484520)
 d: 488397168         0     unused      0     0        # (Cyl.      0 - 484520)
 e:  12096000   4096575       RAID                     # (Cyl.   4064*-  16064*)
 f: 472203648  16192575       RAID                     # (Cyl.  16064*- 484520*)
disklabel を写す
上で作った disklabel を他の三台に写す
# disklabel wd0 > /tmp/1

# disklabel -R /dev/wd1 /tmp/1
# disklabel -R /dev/wd2 /tmp/1
# disklabel -R /dev/wd3 /tmp/1
raid5 の設定
# mkdir /etc/raid
# vi /etc/raid/raid-e.conf
# vi /etc/raid/raid-f.conf
# raidctl -C /etc/raid/raid-e.conf raid0
# raidctl -C /etc/raid/raid-f.conf raid1
# raidctl -I 20081230 raid0                      
# raidctl -I 200812301 raid1
# raidctl -I 200812300 raid0   (上書き訂正)
# raidctl -iv raid0
Initiating re-write of parity
Parity Re-write status:
 99% |***************************************| ETA:    00:02 |
#  raidctl -iv raid1
Initiating re-write of parity
Parity Re-write status:
 66% |**************************             | ETA:    23:46 |
最後の -iv は一時間位かかかる
上の STRIPE の設定は、128 でなくて、64 か 32 の方が良いのでは ? という意見がある:
Re: RAIDframe performance (RAID-5):
http://mail-index.netbsd.org/current-users/2008/08/28/msg004205.html
# newfs /dev/raid0a
newfs: /dev/raid0a: open for write: Device busy
# newfs /dev/rraid0a
/dev/rraid0a: 17718.7MB (36287808 sectors) block size 16384, fragment size 2048
        using 97 cylinder groups of 182.67MB, 11691 blks, 23040 inodes.
super-block backups (for fsck_ffs -b #) at:
32, 374144, 748256, 1122368, 1496480, 1870592, 2244704,
2618816, 2992928, 3367040, 3741152, 4115264, 4489376, 4863488,
5237600, 5611712, 5985824, 6359936,
Last Update: Sat, 07 Jun 2014 22:16:17 GMT 1.66 2008/03/08