TeraStation
    自分の日記など
    その他の URL
設置
  作業方針など
    Linux 設定
      新品の場合
      disk を入替えた場合
    Root で login
    区画
    sysinst
    multi user で起動
      fdisk
    課題
  実際の設置作業
    作業全体の流れ
    詳細
  fdisk
    再起動
    mkfs.xfs
      RAID5 解除前
  sysinst
    fdisk
    disklabel
    fetch
  raid
    disklabel を写す
OS設置後
  RAID
      raid.conf
    区画
  raid 5
    raid0.conf
  raidctl
    用語
    操作
  swap34
    34 入替
  disk 入替
  mfdisk -c
  危険
作業例
  20080302
    追加 patch
    NetBSD 設置後
    boot selector
  20120302
    NetBSD 以前
      卓をつなぐ
      nasupdate
      admin で login
      ts.cgi を変更
      ts.cgi を実行
      sudo -s を確認
      RAID の解除
      一時ネットワーク
    USB メモリを用意
    RAID5 設定
      fdisk
      raid 設定
    sysinst
    pkgsrc
    raid
    problem
RAID HowTO
  20080428
    sysinst(fdisk)
    sysinst(disklabel)
    raid5
    sysinst (raid)
    multi-user
    raidctl -iv
  disk 障害
  boot selector

hardware | kuro-box | NetBSD/kuro-box | software

TeraStation

Last Update: "2008/04/20 11:05:02 makoto"

raid

disklabel を写す

less
# disklabel wd0
# /dev/rwd0d:
type: unknown
disk: WDC WD1600JS-22
label: 
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 310101
total sectors: 312581808
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   4096512   1397653     4.2BSD   2048 16384     0  # (Cyl.   1386*-   5450*)
 b:    273097    771128       swap                     # (Cyl.    765*-   1035*)
 c: 311179052   1397653     unused      0     0        # (Cyl.   1386*- 310095*)
 d: 312581808         0     unused      0     0        # (Cyl.      0 - 310100)
 e:    771057        63 Linux Ext2      0     0        # (Cyl.      0*-    764)
 f: 307082540   5494165     4.2BSD   2048 16384     0  # (Cyl.   5450*- 310095*)
 g:    353428   1044225 Linux Ext2      0     0        # (Cyl.   1035*-   1386*)
# dd if=/dev/wd0d of=/dev/wd1d skip=1397653 seek=1397653 count=40
40+0 records in
40+0 records out
20480 bytes transferred in 0.046 secs (445217 bytes/sec)
# dd if=/dev/wd0d of=/dev/wd2d skip=1397653 seek=1397653 count=40
40+0 records in
40+0 records out
20480 bytes transferred in 0.020 secs (1024000 bytes/sec)
# dd if=/dev/wd0d of=/dev/wd3d skip=1397653 seek=1397653 count=40
40+0 records in
40+0 records out
20480 bytes transferred in 0.026 secs (787692 bytes/sec)
# 
# dd if=/dev/rwd0d of=/dev/rwd1d count=40
wd1: no disk label
40+0 records in
40+0 records out
20480 bytes transferred in 0.366 secs (55956 bytes/sec)
# dd if=/dev/rwd0d of=/dev/rwd2d count=40
wd2: no disk label
40+0 records in
40+0 records out
20480 bytes transferred in 0.366 secs (55956 bytes/sec)
# dd if=/dev/rwd0d of=/dev/rwd3d count=40
# raidctl -C /etc/raid/raid0.conf raid0
raid0: Component /dev/wd0a being configured at col: 0
         Column: 24 Num Columns: 0
         Version: 0 Serial Number: 0 Mod Counter: 2
         Clean: No Status: 0
Row out of alignment for: /dev/wd0a
Column out of alignment for: /dev/wd0a
Number of columns do not match for: /dev/wd0a
/dev/wd0a is not clean!
raid0: Component /dev/wd1a being configured at col: 1
         Column: 24 Num Columns: 0
         Version: 0 Serial Number: 0 Mod Counter: 2
         Clean: No Status: 0
Row out of alignment for: /dev/wd1a
Column out of alignment for: /dev/wd1a
Number of columns do not match for: /dev/wd1a
/dev/wd1a is not clean!
raid0: Component /dev/wd2a being configured at col: 2
         Column: 24 Num Columns: 0
         Version: 0 Serial Number: 0 Mod Counter: 2
         Clean: No Status: 0
Row out of alignment for: /dev/wd2a
Column out of alignment for: /dev/wd2a
Number of columns do not match for: /dev/wd2a
/dev/wd2a is not clean!
raid0: Component /dev/wd3a being configured at col: 3
         Column: 24 Num Columns: 0
         Version: 0 Serial Number: 0 Mod Counter: 2
         Clean: No Status: 0
Row out of alignment for: /dev/wd3a
Column out of alignment for: /dev/wd3a
Number of columns do not match for: /dev/wd3a
/dev/wd3a is not clean!
raid0: There were fatal errors
raid0: Fatal errors being ignored.
raid0: RAID Level 5
raid0: Components: /dev/wd0a /dev/wd1a /dev/wd2a /dev/wd3a
raid0: Total Sectors: 12289344 (6000 MB)
# disklabel wd1d
# /dev/rwd1d:
type: unknown
disk: WDC WD1600JS-22
label: 
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 310101
total sectors: 312581808
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   4096512   1397653     4.2BSD   2048 16384     0  # (Cyl.   1386*-   5450*)
 b:    273097    771128       swap                     # (Cyl.    765*-   1035*)
 c: 311179052   1397653     unused      0     0        # (Cyl.   1386*- 310095*)
 d: 312581808         0     unused      0     0        # (Cyl.      0 - 310100)
 e:    771057        63 Linux Ext2      0     0        # (Cyl.      0*-    764)
 f: 307082540   5494165     4.2BSD   2048 16384     0  # (Cyl.   5450*- 310095*)
 g:    353428   1044225 Linux Ext2      0     0        # (Cyl.   1035*-   1386*)
# ^C
# raidctl -I 20080420 raid0
# raidctl -iv raid0
Initiating re-write of parity
Parity Re-write status:
Parity Re-write status:
# 15% |******                                 | ETA:    06:23 |
# disklabel raid0
# /dev/rraid0d:
type: RAID
disk: raid
label: default label
flags:
bytes/sector: 512
sectors/track: 96
tracks/cylinder: 16
sectors/cylinder: 1536
cylinders: 8000
total sectors: 12289344
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

4 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 d:  12289344         0     4.2BSD      0     0     0  # (Cyl.      0 -   8000*)
disklabel: boot block size 0
disklabel: super block size 0
# newfs -m 5 /dev/raid0d
/dev/raid0d: 6000.7MB (12289344 sectors) block size 16384, fragment size 2048
        using 33 cylinder groups of 181.84MB, 11638 blks, 23040 inodes.
super-block backups (for fsck_ffs -b #) at:
32, 372448, 744864, 1117280, 1489696, 1862112, 2234528, 2606944, 2979360,
.......................................
wrong boot device:
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
warning: lookup /dev/console: error 20
exec /sbin/init: error 20
init: trying /sbin/oinit
exec /sbin/oinit: error 20
init: trying /sbin/init.bak
exec /sbin/init.bak: error 20
init: not found
panic: no init
Stopped in pid 1.1 (init) at    netbsd:cpu_Debugger+0x10:       lwz     r0, r1, 
0
x14
db> 
/mnt/usbdisk1/netbsdboot:
NBLOADER=nbloader_v3.o
NBKERNEL=netbsd-KUROBOX.bin
NBBOOTDEV=raid0
boot device: <unknown>
root device: raid0a
use one of: re0 wd0[a-p] wd1[a-p] wd2[a-p] wd3[a-p] sd0[a-p] ddb halt reboot
raidctl -A root raid0
Last Update: Sat, 07 Jun 2014 13:16:17 GMT 1.66 2008/03/08