Changes between Version 6 and Version 7 of TipAndDoc/storage/RAID/rescue/RAID1
- Timestamp:
- Mar 25, 2011 9:19:26 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TipAndDoc/storage/RAID/rescue/RAID1
v6 v7 2 2 3 3 = RAID1 = 4 = = two of two devices are alive and clean ==4 = two of two devices are alive and clean = 5 5 * see wiki:TipAndDoc/HA/NFS#mdadm for how to make device 6 6 * 以下は済んでいるが、Logical volumeは作っていない … … 99 99 }}} 100 100 101 = = rescue with Knoppix ==101 = rescue with Knoppix = 102 102 * root@Knoppix:~# cat /etc/knoppix-version 103 103 {{{ … … 109 109 }}} 110 110 111 == = devices ===111 == devices == 112 112 * root@Knoppix:~# ls -l /dev/sd? 113 113 {{{ … … 116 116 }}} 117 117 118 == = modprobe ===118 == modprobe == 119 119 * root@Knoppix:~# cat /proc/mdstat 120 120 {{{ … … 130 130 }}} 131 131 132 == = scan devices ===132 == scan devices == 133 133 * root@Knoppix:~# mdadm -E /dev/sd* 2>/dev/null 134 134 {{{ … … 194 194 }}} 195 195 196 == = method 1 ===196 == method 1 == 197 197 * root@Knoppix:~# mdadm -A /dev/md0 -u 32578407:6f33f50b:893cf340:745f5dce 198 198 {{{ … … 204 204 }}} 205 205 206 == = method 2 ===206 == method 2 == 207 207 * root@Knoppix:~# mdadm -A /dev/md0 /dev/sd[ab]1 208 208 {{{ … … 210 210 }}} 211 211 212 == = result ===212 == result == 213 213 * root@Knoppix:~# cat /proc/mdstat 214 214 {{{ … … 262 262 }}} 263 263 264 = = degraded RAID1 ==265 == = devices ===264 = degraded RAID1 = 265 == devices == 266 266 * root@Knoppix:~# ls -l /dev/sd? 267 267 {{{ … … 269 269 }}} 270 270 271 == = modprobe ===271 == modprobe == 272 272 * root@Knoppix:~# cat /proc/mdstat 273 273 {{{ … … 319 319 }}} 320 320 321 == = method 1 ===321 == method 1 == 322 322 * root@Knoppix:~# mdadm -A /dev/md0 -u 32578407:6f33f50b:893cf340:745f5dce 323 323 {{{ … … 325 325 }}} 326 326 327 == = method 2 ===327 == method 2 == 328 328 * root@Knoppix:~# mdadm -A /dev/md0 /dev/sda1 329 329 {{{ … … 331 331 }}} 332 332 333 == = result ===333 == result == 334 334 * root@Knoppix:~# cat /proc/mdstat 335 335 {{{ … … 372 372 }}} 373 373 374 = = two of two devices alive but not same ==374 = two of two devices alive but not same = 375 375 * degraded RAID1に対して、(片方のHDDだけattachされている状態で)何らかの操作を行い、後から古いHDDをre-addした際の挙動を調べる 376 376 377 == = make Logical volume on degraded RAID1 ===378 === = status ====377 == make Logical volume on degraded RAID1 == 378 === status === 379 379 * mitty@ubuntu-haa:~$ ls -l /dev/sd* 380 380 {{{ … … 437 437 }}} 438 438 439 === = make /dev/vgnfs/drbd ====439 === make /dev/vgnfs/drbd === 440 440 * mitty@ubuntu-haa:~$ sudo lvcreate --size 1.5G -n drbd vgnfs 441 441 {{{ … … 461 461 }}} 462 462 463 === = mdadm Events increased ====463 === mdadm Events increased === 464 464 * mitty@ubuntu-haa:~$ sudo mdadm -E /dev/sdb1 465 465 {{{ … … 493 493 }}} 494 494 495 = = rescue with two devices on Knoppix ==496 == = devices ===495 = rescue with two devices on Knoppix = 496 == devices == 497 497 * root@Knoppix:~# mdadm -E /dev/sd[ab]1 498 498 {{{ … … 553 553 }}} 554 554 555 == = assemble md0 and md1 ===555 == assemble md0 and md1 == 556 556 * 上記の # mdadm -E /dev/sd[ab]1 の結果から、RAID1デバイスのうち /dev/sda1 が最新であると推定されるが、その確認として /dev/sd[ab]1 をそれぞれRAID1としてAssembleする 557 557 558 === = assemble md0 ====558 === assemble md0 === 559 559 * root@Knoppix:~# mdadm -A /dev/md0 -u 32578407:6f33f50b:893cf340:745f5dce 560 560 {{{ … … 572 572 * どちらが最新であるかどのように判断しているかが不明 (Events? Update Time?) 573 573 574 === = assemble md1 ====574 === assemble md1 === 575 575 * root@Knoppix:~# mdadm -A /dev/md1 /dev/sdb1 576 576 {{{ … … 590 590 * この時点では md1 は動いていない 591 591 592 === = scanning LVM ====592 === scanning LVM === 593 593 * /dev/sda1 -> /dev/md0 のみが有効なので、/dev/vgnfs/drbdが正常に表示される 594 594 … … 623 623 }}} 624 624 625 === = start md1 ====625 === start md1 === 626 626 * root@Knoppix:~# mdadm -R /dev/md1 627 627 {{{ … … 640 640 }}} 641 641 642 === = pvchange duplicate PV ====642 === pvchange duplicate PV === 643 643 * root@Knoppix:~# pvscan 644 644 {{{ … … 715 715 * /dev/sdb1 -> /dev/md1 の Events が 0.34 -> 0.36 と増加 716 716 717 === = new Physical volume ====717 === new Physical volume === 718 718 * UUIDを変更した場合、双方のPVが表示されるようになるが、VGは片方のみ表示される 719 719 … … 768 768 }}} 769 769 770 === = stop md0 ====770 === stop md0 === 771 771 * /dev/md0 を止めることで、 /dev/md1 上のVGを表示出来る 772 772 … … 818 818 * /dev/md1 はLVが作られていないので、PEが全てFreeのまま 819 819 820 == = re-assemble /dev/md0 with two device ===820 == re-assemble /dev/md0 with two device == 821 821 * [#assemblemd0andmd1] の過程で、PVのUUID等が不一致となったデバイスからRAID1を再構築する 822 822 823 === = stop md0 and md1 ====823 === stop md0 and md1 === 824 824 * root@Knoppix:~# mdadm --stop /dev/md0 825 825 {{{ … … 837 837 }}} 838 838 839 === = mdadm status ====839 === mdadm status === 840 840 * root@Knoppix:~# mdadm -E /dev/sd[ab]1 841 841 {{{ … … 896 896 }}} 897 897 898 === = assemble /dev/md0 ====898 === assemble /dev/md0 === 899 899 * root@Knoppix:~# mdadm -A /dev/md0 /dev/sd[ab]1 900 900 {{{ … … 923 923 * no output 924 924 925 === = assemble /dev/md0 with /dev/sda1 ====925 === assemble /dev/md0 with /dev/sda1 === 926 926 * 明示的に /dev/sda1 から /dev/md0 を再構成する 927 927 … … 946 946 * LVの drbd が復活する 947 947 948 === = re-add /dev/sdb1 to /dev/md0 ====948 === re-add /dev/sdb1 to /dev/md0 === 949 949 * root@Knoppix:~# mdadm /dev/md0 -a /dev/sdb1 950 950 {{{ … … 1036 1036 * Events がさらに増加して 0.42 となる 1037 1037 1038 === = something wrong on PV on RAID1 ====1038 === something wrong on PV on RAID1 === 1039 1039 * /dev/sda1 と /dev/sdb1 が同期されたように見えて、実際にはされていない? 1040 1040 … … 1064 1064 }}} 1065 1065 1066 === = correct PV with degraded RAID1 ====1066 === correct PV with degraded RAID1 === 1067 1067 * root@Knoppix:~# mdadm --stop /dev/md0 1068 1068 {{{ … … 1088 1088 }}} 1089 1089 1090 === = PV goes wrong when re-add /dev/sdb1 ====1090 === PV goes wrong when re-add /dev/sdb1 === 1091 1091 * root@Knoppix:~# mdadm /dev/md0 -a /dev/sdb1 1092 1092 {{{ … … 1118 1118 }}} 1119 1119 1120 === = erase superblock of sdb1 ====1120 === erase superblock of sdb1 === 1121 1121 * root@Knoppix:~# mdadm --stop /dev/md0 1122 1122 {{{ … … 1135 1135 }}} 1136 1136 1137 === = rebuilding /dev/md0 ====1137 === rebuilding /dev/md0 === 1138 1138 * root@Knoppix:~# mdadm /dev/md0 -a /dev/sdb1 1139 1139 {{{ … … 1208 1208 }}} 1209 1209 1210 == = result ===1210 == result == 1211 1211 * root@Knoppix:~# pvdisplay 1212 1212 {{{