|
sd0 at scsibus0 target0 lun 0:
<SEAGATE, ST32430N SUN2.1G, 0444> SCSI2 0/direct fixed sd0: 2049 MB, 3992 cyl, 9 head, 116 sec, 512 bytes/sect x4197405 sectors sd0: sync (100.0ns offset 15), 8-bit (10.000MB/s)transfers, tagged queueing sd1: at scsibus0 target 1 lun 0: <SEAGATE, ST32430N SUN2.1G, 0444> SCSI2 0/direct fixed sd1: 2049 MB, 3992 cyl, 9 head, 116 sec, 512 bytes/sect x 4197405 sectors sd1: sync (100.0ns offset 15), 8-bit (10.000MB/s) transfers, tagged queueing |
|
sd0 at scsibus0 target 0 lun ? # SCSI disk drives sd1 at scsibus0 target 1 lun ? # SCSI disk drives sd2 at scsibus0 target 2 lun ? # SCSI disk drives sd3 at scsibus0 target 3 lun ? # SCSI disk drives sd4 at scsibus0 target 4 lun ? # SCSI disk drives sd5 at scsibus0 target 5 lun ? # SCSI disk drives sd6 at scsibus0 target 6 lun ? # SCSI disk drives |
# dd if=/dev/zero of=/dev/sd1d bs=8k count=1
| 1+0
records in 1+0 records out 8192 bytes transferred in 0.003 secs (2730666 bytes/sec) |
# disklabel -r sd1d
| sd1:
no disk label disklabel: no disklabelll |
# fdisk sd1
| Disk: /dev/rsd1d NetBSD disklabel disk geometry: cylinders: 3992 heads: 9 sectors/track: 116 (1044 sectors/cylinder) BIOS disk geometry: cylinders: 1023 heads: 64 sectors/track: 32 (2048 sectors/cylinder) Partition table: 0: <UNUSED> 1: <UNUSED> 2: <UNUSED> 3: <UNUSED> |
# disklabel -r -I -e sd1d
| [..snip...] bytes/sector: 512 sectors/track: 116 # Important value! tracks/cylinder: 9 sectors/cylinder: 1044 cylinders: 3992 total sectors: 4197405 [...snip...] 4 partitions: # size offset fstype [fsize bsize cpg/sgs] a: 4197289 116 RAID 0 0 # (Cyl. 0*- 4020*) c: 4197289 116 unused 0 0 # (Cyl. 0*- 4020*) d: 4197405 0 unused 0 0 # (Cyl. 0 - 4020*) |
# vi /etc/raid0.conf
| START array 1 2 0 START disks /dev/sd6a /dev/sd1a START layout 128 1 1 1 START queue fifo 100 |
# raidctl -v -C /etc/raid0.conf raid0
|
RAIDFRAME: protectedSectors is 64 raidlookup on device: /dev/sd6a failed! Hosed component: /dev/sd1a Hosed component: /dev/sd6a raid0: Component /dev/sd6a being configured at row: 0 col: 0 Row: 0 Column: 0 Num Rows: 0 Num Columns: 0 Version: 0 Serial Number: 0 Mod Counter: 0 Clean: No Status: 0 /dev/sd6a has a different modification count: 230 0 Number of rows do not match for: /dev/sd6a Number of columns do not match for: /dev/sd6a /dev/sd6a is not clean! raid0: Component /dev/sd1a being configured at row: 0 col: 1 Row: 0 Column: 0 Num Rows: 1 Num Columns: 2 Version: 2 Serial Number: 1000 Mod Counter: 230 Clean: Yes Status: 0 /dev/sd1a has a different serial number: 0 1000 Column out of alignment for: /dev/sd1a raid0: There were fatal errors raid0: Fatal errors being ignored. RAIDFRAME: Configure (RAID Level 1): total number of sectors is 4197120 (2049 MB) RAIDFRAME(RAID Level 1): Using 6 floating recon bufs with no head sep limit |
# raidctl -v -I 1000 raid0
# raidctl -v -i raid0
| Initiating
re-write raid0: Error re-writing parity! Parity Rewrite status: |
# raidctl -v -s raid0
| Components: /dev/sd6a: failed /dev/sd1a: optimal No spares. /dev/sd6a status is: failed. Skipping label. Component label for /dev/sd1a: Row: 0, Column: 1, Num Rows: 1, Num Columns: 2 Version: 2, Serial Number: 2000, Mod Counter: 237 Clean: No, Status: 0 sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1 Queue size: 100, blocksize: 512, numBlocks: 4197120 RAID Level: 1 Autoconfig: No Root partition: No Last configured as: raid0 Parity status: DIRTY Reconstruction is 100% complete. Parity Rewrite is 100% complete. Copyback is 100% complete. |
# alias r0stat="/sbin/raidctl -v -s raid0|more"
# alias r1stat="/sbin/raidctl -v -s raid1|more"
# disklabel -r -I -e raid0d
| [...snip...] bytes/sector: 512 sectors/track: 128 tracks/cylinder: 8 sectors/cylinder: 1024 cylinders: 4098 total sectors: 4197120 [...snip...] 4 partitions: # size offset fstype [fsize bsize cpg/sgs] a: 4197120 0 4.2BSD 2048 16384 326 # (Cyl. 0 - 4098*) d: 4197120 0 unused 0 0 # (Cyl. 0 - 4098*) |
# newfs /dev/rraid0a
|
2049.4MB in 13 cyl groups (326 c/g, 163.00MB/g, 19968 i/g) super-block backups (for fsck -b #) at: 32, 333984, 667936, 1001888, 1335840, 1669792, 2003744, 2337696, 2670624, 3004576, 3338528, 3672480, 4006432, |
# mount /dev/raid0a /mnt
# df
| Filesystem
1K-blocks Used Avail Capacity Mounted on /dev/sd0a 1985053 222158 1663642 11% / /dev/raid0a 2065678 2 1962392 0% /mnt |
# cd /; pax -X -rw -pe / /mnt
# df -m
| Filesystem
1M-blocks Used Avail Capacity Mounted on /dev/sd0a 1938 216 1624 11% / /dev/raid0a 2017 224 1691 11% /mnt |
# vi /mnt/etc/rc.conf
| rc_configured=YES wscons=YES no_swap=YES sshd=YES inetd=NO |
# vi /mnt/etc/fstab
| /dev/raid0a / ffs rw 1 1 |
# /usr/mdec/installboot -v -b 16 /usr/mdec/biosboot.sym /dev/rsd1d
| /usr/mdec/biosboot.sym:
entry point 0x8063000 proto bootblock size 48128 room for 10 filesystem blocks at 0x580 /dev/rsd1d: block number 16, size 40448 table blocks: 10/10 /dev/rsd1d: block numbers: 16 24 32 40 48 56 64 72 80 88 BSD partition starts at sector 0 |
# fdisk sd1
| Disk:
/dev/rsd1d NetBSD disklabel disk geometry: cylinders: 3992 heads: 9 sectors/track: 116 (1044 sectors/cylinder) BIOS disk geometry: cylinders: 1023 heads: 64 sectors/track: 32 (2048 sectors/cylinder) Partition table: 0: <UNUSED> 1: <UNUSED> 2: <UNUSED> 3: sysid 169 (NetBSD) start 0, size 16 (0 MB), flag 0x80 beg: cylinder 0, head 0, sector 1 end: cylinder 0, head 0, sector 16 |
# raidctl -v -A root raid0
| New
autoconfig value is: 1 New rootpartition value is: 1 raid0: Autoconfigure: Yes raid0: Root: Yes /netbsd: New rootpartition value is: 1 |
# tar [etc.] /etc/raid0.conf
# mv /etc/raid0.conf /root
# shutdown -r NOWAt this point enter your SCSI BIOS setup menu and adjust the boot ID to that of disk1 (normally ID 1). Boot the system. The SCSI controller should probe disk1/ID1 before ID0. The kernel will read RAID autoconfigure data from disk1.
| [...snip...] Kernelized RAIDframe activated RAID autoconfigure Configuring raid0: RAIDFRAME: protectedSectors is 64 RAIDFRAME: Configure (RAID Level 1): total number of sectors is 4197120 (2049 MB) RAIDFRAME(RAID Level 1): Using 6 floating recon bufs with no head sep limit boot device: raid0 root on raid0a dumps on raid0b root file system type: ffs [...snip...] |
# disklabel -r sd1d > /var/tmp/sd1_label
# dd if=/dev/zero of=/dev/rsd0d Bs=8k count=1
# disklabel -I -r -i sd0d
| partition> W Label disk [n]? y Label written partition> Q |
# disklabel -R sd0d /var/tmp/sd1_label
# raidctl -v -a /dev/sd0a raid0
# raidctl -v -s raid0
| Components: component0: failed /dev/sd1a: optimal Spares: /dev/sd0a: spare component0 status is: failed. Skipping label. Component label for /dev/sd1a: Row: 0, Column: 1, Num Rows: 1, Num Columns: 2 Version: 2, Serial Number: 2000, Mod Counter: 259 Clean: No, Status: 0 sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1 Queue size: 100, blocksize: 512, numBlocks: 4197120 RAID Level: 1 Autoconfig: Yes Root partition: Yes Last configured as: raid0 /dev/sd0a status is: spare. Skipping label. Parity status: DIRTY Reconstruction is 100% complete. Parity Rewrite is 100% complete. Copyback is 100% complete. |
# raidctl -v -F component0 raid0
| raid0:
Failing the disk: row: 0 col: 0 raid0: Failing disk r0 c0 Reconstruction status: RECON: initiating reconstruction on row 0 col 0 -> spare at row 0 col 2 Suspending: Waiting for Quiescence Quiescence reached.. |
# raidctl -v -s raid0
| Components: /dev/sd0a: reconstructing /dev/sd1a: optimal |
# raidctl -v -S raid0
| Reconstruction
is 35% complete. Parity Rewrite is 100% complete. Copyback is 100% complete. Reconstruction status: 35% |************** | ETA: 05:03 \ |
# raidctl -v -s raid0
| Components: component0: spared /dev/sd1a: optimal Spares: /dev/sd0a: used_spare component0 status is: spared. Skipping label. Component label for /dev/sd1a: Row: 0, Column: 1, Num Rows: 1, Num Columns: 2 Version: 2, Serial Number: 2000, Mod Counter: 260 Clean: No, Status: 0 sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1 Queue size: 100, blocksize: 512, numBlocks: 4197120 RAID Level: 1 Autoconfig: Yes Root partition: Yes Last configured as: raid0 Component label for /dev/sd0a: Row: 0, Column: 0, Num Rows: 1, Num Columns: 2 Version: 2, Serial Number: 2000, Mod Counter: 260 Clean: No, Status: 0 sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1 Queue size: 100, blocksize: 512, numBlocks: 4197120 RAID Level: 1 Autoconfig: Yes Root partition: Yes Last configured as: raid0 Parity status: clean Reconstruction is 100% complete. Parity Rewrite is 100% complete. Copyback is 100% complete. |
# /usr/mdec/installboot -v -b 16 /usr/mdec/biosboot.sym /dev/rsd0d
| /usr/mdec/biosboot.sym: entry point 0x8063000 proto bootblock size 48128 room for 10 filesystem blocks at 0x580 /dev/rsd0d: block number 16, size 40448 table blocks: 10/10 /dev/rsd0d: block numbers: 16 24 32 40 48 56 64 72 80 88 BSD partition starts at sector 0 |
# shutdown -r NOW
| >>
NetBSD/i386 BIOS Boot, Revision 2.12 >> (autobuild@tgm.daemon.org, Sun Sep 8 19:22:29 UTC 2002) >> Memory: 638/129984 k Press return to boot now, any other key for boot menu booting hd0a:netbsd - starting in 0 type "?" or "help" for help. > dev hd0a: > ls / [Snip] 3: boot (REG) 4: netbsd (REG) [Snip] > dev hd1a: > Ls / [Snip] 3: boot (REG) 4: netbsd (REG) > boot hd0a:netbsd booting hd0a:netbsd 5451936+112040+341476 [304304+255616]=0x62b920 [ using 560372 bytes of netbsd ELF symbol table ] |
Verify that /dev/sd0a has now replaced component0 and that the status of parity is clean.
# df
|
Filesystem 512-blocks Used Avail Capacity Mounted on /dev/raid0a 4131356 465156 3459632 11% / |
# raidctl -v -s raid0
| Components: /dev/sd0a: optimal /dev/sd1a: optimal No spares. Component label for /dev/sd0a: Row: 0, Column: 0, Num Rows: 1, Num Columns: 2 Version: 2, Serial Number: 2000, Mod Counter: 291 Clean: No, Status: 0 sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1 Queue size: 100, blocksize: 512, numBlocks: 4197120 RAID Level: 1 Autoconfig: Yes Root partition: Yes Last configured as: raid0 Component label for /dev/sd1a: Row: 0, Column: 1, Num Rows: 1, Num Columns: 2 Version: 2, Serial Number: 2000, Mod Counter: 291 Clean: No, Status: 0 sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1 Queue size: 100, blocksize: 512, numBlocks: 4197120 RAID Level: 1 Autoconfig: Yes Root partition: Yes Last configured as: raid0 Parity status: clean Reconstruction is 100% complete. Parity Rewrite is 100% complete. Copyback is 100% complete. |
# umask 077
# disklabel -r sd0 > /tmp/sd0_disklabel
# disklabel -r sd1 > /tmp/sd1_disklabel
# fdisk sd0 > /tmp/sd0_MBR
# fdisk sd1 > /tmp/sd1_MBR
# tar [etc.] /tmp/sd*
# raidctl -v -f /dev/sd0a raid0
# raidctl -vs raid0
# raidctl -R /dev/sd0a raid0
# raidctl Vs raid0
# raidctl Vs raid0
# disk sd0
# disklabel -r sd0
# raidctl -v -f /dev/sd1a raid0
# raidctl Vs raid0
# raidctl -R /dev/sd1a raid0
# raidctl Vs raid0
# raidctl Vs raid0
# fdisk sd1
# disklabel -r sd1