2011-06-06 [長年日記]

_ [PC][ubuntu] どうにかRAID1化した。

結局、稼働中のUbuntu 10.04 Server LTSをRAID1化することはできなかった。ダメ人間だ。人(約1名)がゴミのようだ!
1週間かかったのであきらめて、全部データ吸って最初からLVM+RAID構成で入れ直したらまた失敗!死ねや!よく読むと、LVM+RAIDで新規インストールする場合はAlternate版のisoでやれと。なんやそれ知らんちゅうの。
ちょっと時間かかったが、俺でもできた。でもなぜかXが入っとる。サーバアプリの入りっぷりもServerとはだいぶ違う。iptablesも手で書いた。SMTPとPOPを除いて復旧完了。
まあ、クラッシュでデータがアジャパーの心配が減ってよかった。

ところでmysqlってユーザ情報も一撃でリストアする方法ないのか?


NFSとsambaの設定もせなあかん。

SMTPがリレーされないように、http://www.abuse.net/relay.html でチェックした結果。

Relay test result
All tests performed, no relays accepted.
Return to the relay test page. 
おっけー

1個死んだ場合はhttp://yaki-nas.blogspot.com/2009/02/raid1-hdd.htmlとか見ればいいのかな。勝手に引用。
とりあえず現在のパーティションの設定を確認しておく
# fdisk -l /dev/sdb Disk /dev/sdb: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00014aab Device Boot Start End Blocks Id System /dev/sdb1 1 243 1951866 82 Linux swap / Solaris /dev/sdb2 244 60801 486432135 fd Linux raid autodetect
交換したHDDも同じようにパーティションを切る swapも設定していたので使えるようにする # mkswap /dev/sdb1 # /sbin/swapon /dev/sdb1
swapの状態を確認する # cat /proc/swaps Filename Type Size Used Priority /dev/sdc1 partition 1951856 0 -1 /dev/sdb1 partition 1951856 0 -2
交換したHDDのパーティションをRAIDに追加
mdadm --add /dev/sdb2 # cat /proc/mdstat Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md0 : active raid1 sdb2[2] sdc2[1] 486432064 blocks [2/1] [_U] [>....................] recovery = 0.0% (350016/486432064) finish=138.8min speed=58336K/sec
あとは再構築が終わるのまつ

現在のdisk情報メモ。

newbaden:~% sudo fdisk -l /dev/sda
Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000934ea
Device Boot Start End Blocks Id System /dev/sda1 1 132 1060258+ fd Linux raid autodetect /dev/sda2 133 655 4200997+ 82 Linux swap / Solaris /dev/sda3 656 60801 483122745 fd Linux raid autodetect
newbaden:~% sudo fdisk -l /dev/sdb
Disk /dev/sdb: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000b1881
Device Boot Start End Blocks Id System /dev/sdb1 * 1 132 1060258+ fd Linux raid autodetect /dev/sdb2 133 655 4200997+ 82 Linux swap / Solaris /dev/sdb3 656 60801 483122745 fd Linux raid autodetect
死亡の場合通知も飛んでくる。ここと同じhttp://blog.jojo.jp/?eid=1220084
/sbin/mdadm --monitor --pid-file /var/run/mdadm/monitor.pid --daemonise --scan --syslog

検索キーワード:

記事

カテゴリ

Amazon | Android | apache | Arduino | bash | bluetooth | Books | CakePHP | CakePHP3 | CakePHP4 | Chrome | Chromebook | CodeIgniter | CSS | Docker | Eclipse | Emacs | etc | Firefox | Flask | Gadget | git | Gnome | Google | Heroku | HTML | hugo | Internet | iPhone | IS01 | IS03 | Java | JavaScript | json | Kotlin | Laravel | LINE | magento | mysql | nginx | nodejs | Oops | PC | Perl | php | Python | Qt | Ruby | ruby | Shell | ssh | tdiary | twitter | ubuntu | unix | VirtualBox | Web | Windows | windows | WindowsMobile | WX5 | YAML | zsh | ここか | そば | つくる | つり | できごと | アクアリウム | ギター | セキュリティ | プリンタ | ベース | ボクシング | ポエム | マネー | メシ | ラズパイ | 仕事 | 作家 | 壮絶 | 妄想 | 忘れる | 料理 | | 暑い | 痛い | 社会 | 自転車 | | 車輪 | | 野球 | 銭湯 | 音楽 |

全部 : / 今日 :

近頃

links

profile

もっとヒゲ伸ばしたい。