代码: 全选
# vi /var/tmp/raid0.conf
START array
1 2 0
START disks
/dev/wd9a
/dev/wd1a
START layout
128 1 1 1
START queue
fifo 100
代码: 全选
# cd /dev
# sh MAKEDEV wd9
# cd -
在运行NetBSD 2.0+的系统里, 你可以将一个 "假" 组件,诸如 /dev/wd9a 替换为一个特殊的设备名称 "absent" [/INDENT]
接下来,我们配置 RAID 设备并初始化序列号以便使其唯一。 本例中我们使用一个 "YYYYMMDDRevision" 方案。 你选择的这个格式完全根据你自己的判断, 但是你选择的方案必须保证没有两个RAID组在同一个时间内使用相同的序列号。
然后我们首次初始化RAID组, 大胆地忽略有关这个假设备的错误信息。
代码: 全选
# raidctl -v -C /var/tmp/raid0.conf raid0
raidlookup on device: /dev/wd9a failed!
raid0: Component /dev/wd9a being configured at col: 0
Column: 0 Num Columns: 0
Version: 0 Serial Number: 0 Mod Counter: 0
Clean: No Status: 0
Number of columns do not match for: /dev/wd9a
/dev/wd9a is not clean!
raid0: Component /dev/wd1a being configured at col: 1
Column: 0 Num Columns: 0
Version: 0 Serial Number: 0 Mod Counter: 0
Clean: No Status: 0
Column out of alignment for: /dev/wd1a
Number of columns do not match for: /dev/wd1a
/dev/wd1a is not clean!
raid0: There were fatal errors
raid0: Fatal errors being ignored.
raid0: RAID Level 1
raid0: Components: /dev/wd9a[**FAILED**] /dev/wd1a
raid0: Total Sectors: 19540864 (9541 MB)
# raidctl -v -I 2004082401 raid0
# raidctl -v -i raid0
Initiating re-write of parity
# tail -1 /var/log/messages
raid0: Error re-writing parity!
# raidctl -v -s raid0
Components:
/dev/wd9a: failed
/dev/wd1a: optimal
No spares.
/dev/wd9a status is: failed. Skipping label.
Component label for /dev/wd1a:
Row: 0, Column: 1, Num Rows: 1, Num Columns: 2
Version: 2, Serial Number: 2004082401, Mod Counter: 7
Clean: No, Status: 0
sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1
Queue size: 100, blocksize: 512, numBlocks: 19540864
RAID Level: 1
Autoconfig: No
Root partition: No
Last configured as: raid0
Parity status: DIRTY
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.