Last Update: "2008/05/14 18:25:51 makoto"
raid 5
試しに 5G x 4 を RAID 5 で 15G の disk にして見ます。
raid0.conf
tty00:root@tera 19:36:29/070609(~)# cat /etc/raid/raid0.conf
START array
# numRow numCol numSpare
1 4 0
START disks
/dev/wd0a
/dev/wd1a
/dev/wd2a
/dev/wd3a
#START spare
#/dev/wd3a
START layout
# sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_1
32 1 1 5
START queue
fifo 100
以下では vi を使っていますが、使えない時には、次のような方法で入力する
のも一つの方法です。
mkdir /etc/raid
cat > /etc/raid/raid0.conf
... 入力
^D
tty00:root@tera 19:38:49/070609(~)#
55 18:53 vi /etc/raid/raid0.conf
56 18:53 raidctl -C /etc/raid/raid0.conf raid0
57 18:54 raidctl -I 20070610 raid0
raidctl -A root raid0
58 18:54 raidctl -iv raid0
(所要 20 分)
66 19:30 disklabel raid0
67 19:30 newfs -m 2 /dev/raid0d
70 19:36 mount /dev/raid0d /mnt
71 19:36 df -k
tty00:root@tera 19:36:29/070609(~)#
最初は次のように沢山問題が表示されます。
Jun 9 18:53:56 tera /netbsd: Hosed component: /dev/wd1a
Jun 9 18:53:56 tera /netbsd: raid0: Component /dev/wd0a being configured at col: 0
Jun 9 18:53:56 tera /netbsd: Column: 0 Num Columns: 0
Jun 9 18:53:56 tera /netbsd: Version: 0 Serial Number: 0 Mod Counter: 14
Jun 9 18:53:56 tera /netbsd: Clean: No Status: 0
Jun 9 18:53:56 tera /netbsd: Number of columns do not match for: /dev/wd0a
Jun 9 18:53:56 tera /netbsd: /dev/wd0a is not clean!
Jun 9 18:53:56 tera /netbsd: raid0: Ignoring /dev/wd1a
Jun 9 18:53:56 tera /netbsd: raid0: Component /dev/wd2a being configured at col: 2
Jun 9 18:53:56 tera /netbsd: Column: 24 Num Columns: 0
Jun 9 18:53:56 tera /netbsd: Version: 0 Serial Number: 0 Mod Counter: 14
Jun 9 18:53:56 tera /netbsd: Clean: No Status: 0
Jun 9 18:53:56 tera /netbsd: Row out of alignment for: /dev/wd2a
Jun 9 18:53:56 tera /netbsd: Column out of alignment for: /dev/wd2a
Jun 9 18:53:56 tera /netbsd: Number of columns do not match for: /dev/wd2a
Jun 9 18:53:56 tera /netbsd: /dev/wd2a is not clean!
Jun 9 18:53:56 tera /netbsd: raid0: Component /dev/wd3a being configured at col: 3
Jun 9 18:53:56 tera /netbsd: Column: 0 Num Columns: 0
Jun 9 18:53:56 tera /netbsd: Version: 0 Serial Number: 0 Mod Counter: 14
Jun 9 18:53:56 tera /netbsd: Clean: No Status: 0
Jun 9 18:53:56 tera /netbsd: Column out of alignment for: /dev/wd3a
Jun 9 18:53:56 tera /netbsd: Number of columns do not match for: /dev/wd3a
Jun 9 18:53:56 tera /netbsd: /dev/wd3a is not clean!
Jun 9 18:53:56 tera /netbsd: raid0: There were fatal errors
Jun 9 18:53:56 tera /netbsd: raid0: Fatal errors being ignored.
Jun 9 18:53:56 tera /netbsd: raid0: RAID Level 5
Jun 9 18:53:56 tera /netbsd: raid0: Components: /dev/wd0a /dev/wd1a /dev/wd2a /dev/wd3a
Jun 9 18:53:56 tera /netbsd: raid0: Total Sectors: 30720576 (15000 MB)
raid1 の方も設定しておきます。
raidctl -C /etc/raid/raid1.conf raid1
raidctl -I 20070610 raid1
raidctl -iv raid1
raidctl -A yes raid1
全てが終って、もし再起動した後に調べると、
先ほどの問題は表示されなくなります。
tera# raidctl -c /etc/raid/raid1.conf raid1
raid1: Component /dev/wd0h being configured at col: 0
Column: 0 Num Columns: 4
Version: 2 Serial Number: 20070610 Mod Counter: 44
Clean: Yes Status: 0
raid1: Component /dev/wd1h being configured at col: 1
Column: 1 Num Columns: 4
Version: 2 Serial Number: 20070610 Mod Counter: 44
Clean: Yes Status: 0
raid1: Component /dev/wd2h being configured at col: 2
Column: 2 Num Columns: 4
Version: 2 Serial Number: 20070610 Mod Counter: 44
Clean: Yes Status: 0
raid1: Component /dev/wd3h being configured at col: 3
Column: 3 Num Columns: 4
Version: 2 Serial Number: 20070610 Mod Counter: 44
Clean: Yes Status: 0
raid1: RAID Level 5
raid1: Components: /dev/wd0h /dev/wd1h /dev/wd2h /dev/wd3h
raid1: Total Sectors: 1430132736 (698307 MB)
tera#
'raidctl -A yes raid1' した時には次のような表示になります。
tera# raidctl -A yes raid1
raid1: New autoconfig value is: 1
raid1: New rootpartition value is: 0
raid1: Autoconfigure: Yes
tera#
性能の確認として、NFS マウントしたファイルを dd で写す
ttyq2:makoto@bologna 23:32:49/070617(~)> \
dd if=/e/tera/j/ftp/pub/NetBSD/snapshot/20070203ts/20070517.iso of=/dev/null
1421016+0 records in
1421016+0 records out
727560192 bytes transferred in 130.136 secs (5590768 bytes/sec)
ttyq2:makoto@bologna 23:35:38/070617(~)>
|