RAID1 化、再び

Debian TS-WXL

DISK1 を交換したので、再度RAID1 化

sda にパーティションを切る

パーティションテーブルの作成

tswxl:~# parted -s /dev/sda print
Model: Hitachi HDT722525DLA380 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

tswxl:~# parted -s /dev/sda mklabel gpt
tswxl:~# parted -s /dev/sda print
Model: Hitachi HDT722525DLA380 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

tswxl:~#

パーティションの作成

tswxl:~# parted -s /dev/sda mkpart primary ext3 0 1024M
tswxl:~# parted -s /dev/sda mkpart primary ext3 1024M 6144M
tswxl:~# parted -s /dev/sda mkpart primary 6144M 6144M
tswxl:~# parted -s /dev/sda mkpart primary 6144M 6144M
tswxl:~# parted -s /dev/sda mkpart primary linux-swap 6144MB  7168MB
tswxl:~# parted -s /dev/sda mkpart primary xfs 7168MB 250GB
tswxl:~# parted -s /dev/sda print
Model: Hitachi HDT722525DLA380 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  1024MB  1024MB               primary
 2      1024MB  6144MB  5120MB               primary
 3      6144MB  6144MB  512B                 primary
 4      6144MB  6144MB  512B                 primary
 5      6144MB  7168MB  1024MB               primary
 6      7168MB  250GB   243GB                primary

tswxl:~#

sda を md に追加

md0

tswxl:~# mdadm -a /dev/md0 /dev/sda1
md: bind
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:1, o:1, dev:sda1
 disk 1, wo:0, o:1, dev:sdb1
md: recovery of RAID array md0
md: minimum _guaranteed_  speed: 1000 KB/sec/disk.
md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for recovery.
md: using 128k window, over a total of 999872 blocks.
mdadm: added /dev/sda1
tswxl:~# cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4]
md1 : active raid1 sdb2[1]
      4999936 blocks [2/1] [_U]

md10 : active raid1 sdb5[1]
      999872 blocks [2/1] [_U]

md0 : active raid1 sda1[2] sdb1[1]
      999872 blocks [2/1] [_U]
      [====>................]  recovery = 24.6% (247552/999872) finish=0.2min speed=49818K/sec

unused devices: 
tswxl:~# md: md0: recovery done.
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sda1
 disk 1, wo:0, o:1, dev:sdb1

tswxl:~#

md1

tswxl:~# mdadm -a /dev/md1 /dev/sda2
md: bind
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:1, o:1, dev:sda2
 disk 1, wo:0, o:1, dev:sdb2
md: recovery of RAID array md1
md: minimum _guaranteed_  speed: 1000 KB/sec/disk.
md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for recovery.
md: using 128k window, over a total of 4999936 blocks.
mdadm: added /dev/sda2
tswxl:~# cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4]
md1 : active raid1 sda2[2] sdb2[1]
      4999936 blocks [2/1] [_U]
      [====>................]  recovery = 24.2% (1212224/4999936) finish=1.2min speed=48553K/sec

md10 : active raid1 sdb5[1]
      999872 blocks [2/1] [_U]

md0 : active raid1 sda1[0] sdb1[1]
      999872 blocks [2/2] [UU]

unused devices: 
tswxl:~#tswxl:~# md: md1: recovery done.
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sda2
 disk 1, wo:0, o:1, dev:sdb2

md10

tswxl:~# mdadm -a /dev/md10 /dev/sda5
md: bind
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:1, o:1, dev:sda5
 disk 1, wo:0, o:1, dev:sdb5
md: recovery of RAID array md10
md: minimum _guaranteed_  speed: 1000 KB/sec/disk.
md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for recovery.
md: using 128k window, over a total of 999872 blocks.
mdadm: added /dev/sda5
tswxl:~# cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4]
md1 : active raid1 sda2[0] sdb2[1]
      4999936 blocks [2/2] [UU]

md10 : active raid1 sda5[2] sdb5[1]
      999872 blocks [2/1] [_U]
      [==>..................]  recovery = 14.9% (150016/999872) finish=0.2min speed=50006K/sec

md0 : active raid1 sda1[0] sdb1[1]
      999872 blocks [2/2] [UU]

unused devices: 
tswxl:~# md: md10: recovery done.
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sda5
 disk 1, wo:0, o:1, dev:sdb5

ようやく

tswxl:~# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: Hitachi  Model: HDT722525DLA380  Rev: V44O
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: Hitachi  Model: HDT722525DLA380  Rev: V44O
  Type:   Direct-Access                    ANSI  SCSI revision: 05
tswxl:~#
同じ DISK が2台入った

TS-WXL
楽天市場
amazon
Yahoo ショッピング
Livedoor デパート


ホットプラグ。。。
ハックの記録
LinkStation/玄箱 をハックしよう

データ領域の RAID1 化

Copyright (C) 2003-2010 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市