昨日ですが、今年初めて蝉の鳴き声に気がつ付きました
引越しして初めての夏です。
やたら暑く感じるのはなぜでしょうか?
去年は7/21でした。
昨日ですが、今年初めて蝉の鳴き声に気がつ付きました
引越しして初めての夏です。
やたら暑く感じるのはなぜでしょうか?
去年は7/21でした。
箱根大涌谷の玉子茶屋で温泉たまごを作っているところです
5 つで 500 円でした。
塩もついてます
Software RAID のハードディスクが壊れたっぽいのでディスクを交換して RAID の復旧を行いました。
ハードディスクが壊れたっぽい、もしくはそろそろ壊れそうと思ったのはこんなメールが送られて来たからです。
Jun 30 10:55:21 ns1 smartd[3428]: Device: /dev/hdc, FAILED SMART self-check. BACK UP DATA NOW!
[root@ns1 ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 hdc2[1] hda2[0]
2096384 blocks [2/2] [UU]
md2 : active raid1 hdc3[1] hda3[0]
75762432 blocks [2/2] [UU]
md0 : active raid1 hdc1[1] hda1[0]
264960 blocks [2/2] [UU]
unused devices: <none>[root@ns1 ~]# fdisk -l /dev/hda Disk /dev/hda: 80.0 GB, 80000000000 bytes 255 heads, 63 sectors/track, 9726 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 33 265041 fd Linux raid autodetect /dev/hda2 34 294 2096482+ fd Linux raid autodetect /dev/hda3 295 9726 75762540 fd Linux raid autodetect [root@ns1 ~]# smartctl -a /dev/hdc 結果が長いので省略しました。
[root@ns1 ~]# mdadm --manage /dev/md0 --fail /dev/hdc1
mdadm: set /dev/hdc1 faulty in /dev/md0
[root@ns1 ~]# mdadm --manage /dev/md1 --fail /dev/hdc2
mdadm: set /dev/hdc2 faulty in /dev/md1
[root@ns1 ~]# mdadm --manage /dev/md2 --fail /dev/hdc3
mdadm: set /dev/hdc3 faulty in /dev/md2
すると mdstat はこんな風になります。
[root@ns1 ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 hdc2[2](F) hda2[0]
2096384 blocks [2/1] [U_]
md2 : active raid1 hdc3[2](F) hda3[0]
75762432 blocks [2/1] [U_]
md0 : active raid1 hdc1[2](F) hda1[0]
264960 blocks [2/1] [U_]
unused devices: <none>
さらに続けて以下を実施。
[root@ns1 ~]# mdadm --manage /dev/md0 --remove /dev/hdc1
mdadm: hot removed /dev/hdc1
[root@ns1 ~]# mdadm --manage /dev/md1 --remove /dev/hdc2
mdadm: hot removed /dev/hdc2
[root@ns1 ~]# mdadm --manage /dev/md2 --remove /dev/hdc3
mdadm: hot removed /dev/hdc3
/dev/hdc が RAID デバイスから削除されました。
[root@ns1 ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 hda2[0]
2096384 blocks [2/1] [U_]
md2 : active raid1 hda3[0]
75762432 blocks [2/1] [U_]
md0 : active raid1 hda1[0]
264960 blocks [2/1] [U_]
unused devices: <none>[root@ns1 ~]# sync;sync;sync;shutdown -h now 電源停止後ディスク交換。
デフォルトの状態はこんな風になっていました。 [root@ns1 ~]# fdisk /dev/ -l /dev/hdc last_lba(): I don't know how to handle files with mode 41ed Disk /dev/hdc: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/hdc doesn't contain a valid partition table で、/dev/hda と同じようにパーティションを切りました。 [root@ns1 ~]# fdisk /dev/hdc Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-9729, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-9729, default 9729): 33 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (34-9729, default 34): Using default value 34 Last cylinder or +size or +sizeM or +sizeK (34-9729, default 9729): 294 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 3 First cylinder (295-9729, default 295): Using default value 295 Last cylinder or +size or +sizeM or +sizeK (295-9729, default 9729): 9726 Command (m for help): t Partition number (1-4): 1 Hex code (type L to list codes): fd Changed system type of partition 1 to fd (Linux raid autodetect Command (m for help): t Partition number (1-4): 2 Hex code (type L to list codes): fd Changed system type of partition 2 to fd (Linux raid autodetect) Command (m for help): t Partition number (1-4): 3 Hex code (type L to list codes): fd Changed system type of partition 3 to fd (Linux raid autodetect) Command (m for help): p Disk /dev/hdc: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hdc1 1 33 265041 fd Linux raid autodetect /dev/hdc2 34 294 2096482+ fd Linux raid autodetect /dev/hdc3 295 9726 75762540 fd Linux raid autodetect Command (m for help): a Partition number (1-4): 1 Command (m for help): p Disk /dev/hdc: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hdc1 * 1 33 265041 fd Linux raid autodetect /dev/hdc2 34 294 2096482+ fd Linux raid autodetect /dev/hdc3 295 9726 75762540 fd Linux raid autodetect Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. そして、以下で確認しました。 [root@ns1 ~]# fdisk -l /dev/hdc Disk /dev/hdc: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hdc1 * 1 33 265041 fd Linux raid autodetect /dev/hdc2 34 294 2096482+ fd Linux raid autodetect /dev/hdc3 295 9726 75762540 fd Linux raid autodetect
[root@ns1 ~]# mdadm --manage /dev/md0 --add /dev/hdc1
mdadm: hot added /dev/hdc1
[root@ns1 ~]# mdadm --manage /dev/md1 --add /dev/hdc2
mdadm: hot added /dev/hdc2
[root@ns1 ~]# mdadm --manage /dev/md2 --add /dev/hdc3
mdadm: hot added /dev/hdc3
mdstat を見るとリシンクしている状況を確認できます。
[root@ns1 ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 hdc2[2] hda2[0]
2096384 blocks [2/1] [U_]
[=====>...............] recovery = 25.7% (540800/2096384) finish=0.9min speed=27040K/sec
md2 : active raid1 hdc3[2] hda3[0]
75762432 blocks [2/1] [U_]
resync=DELAYED
md0 : active raid1 hdc1[1] hda1[0]
264960 blocks [2/2] [UU]
unused devices: <none>
立て続けに複数のパーティションを --add しても同時に複数のリシンクが走らないみたいです。
最終的に完了すると以下のようになります。
[tatsu@ns1 ~]$ cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 hdc2[1] hda2[0]
2096384 blocks [2/2] [UU]
md2 : active raid1 hdc3[1] hda3[0]
75762432 blocks [2/2] [UU]
md0 : active raid1 hdc1[1] hda1[0]
264960 blocks [2/2] [UU]
unused devices: <none>
[root@ns1 ~]# grub
GNU GRUB version 0.95 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> device (hd0) /dev/hdc
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0xfd
grub> install /grub/stage1 (hd0) /grub/stage2 p /grub/grub.conf
grub> quit
確認はこうするようです。
[root@ns1 ~]# dd if=/dev/hdc bs=512k count=1 | strings
ZRrI
D|f1
GRUB
Geom
Hard Disk
Read
Error
ZRrI
D|f1
GRUB
Geom
Hard Disk
Read
Error
qH*L
sH*L
1+0 records in
1+0 records out
ssh brute force attack 対策に fail2ban を試してみました。
ssh でログインを試みる攻撃が沢山来ているので、fail2ban を使って同じ IP から指定した回数以上認証に失敗した場合には、その IP からのアクセスを一定期間拒否しするようにしました。
# yum install --enablerepo=rpmforge fail2ban
# cd /etc/fail2ban # cp -p jail.conf jail.conf.ORG # diff jail.conf.ORG jail.conf # vi jail.conf
[DEFAULT] ignoreip = 127.0.0.1 10.0.0.0/24 maxretry = 5
[ssh-iptables]
enabled = true
filter = sshd
action = iptables[name=SSH, port=ssh, protocol=tcp]
sendmail-whois[name=SSH, dest=root, sender=foo@example.com]
logpath = /var/log/secure
maxretry = 5# chkconfig fail2ban on # chkconfig --list fail2ban fail2ban 0:off 1:off 2:on 3:on 4:on 5:on 6:off
# service fail2ban start Starting fail2ban: [ OK ]
# ll /var/log/fail2ban.log -rw------- 1 root root 2306 May 10 10:42 /var/log/fail2ban.log
Subject: [Fail2Ban] SSH: banned 111.222.333.444 From: Fail2Ban <foo@example.com> To: root@example.com Date: Tue, 11 May 2010 14:23:00 +0900 (JST) Hi, The IP 111.222.333.444 has just been banned by Fail2Ban after 5 attempts against SSH. Here are more information about 111.222.333.444: [Querying whois.arin.net] [Redirected to whois.lacnic.net] [Querying whois.lacnic.net] [whois.lacnic.net] % Joint Whois - whois.lacnic.net % This server accepts single ASN, IPv4 or IPv6 queries % LACNIC resource: whois.lacnic.net % Copyright LACNIC lacnic.net % The data below is provided for information purposes % and to assist persons in obtaining information about or % related to AS and IP numbers registrations % By submitting a whois query, you agree to use this data % only for lawful purposes. % 2010-05-11 02:22:59 (BRT -03:00) inetnum: 111.222/14 status: allocated owner: XXXXXXX ownerid: XX-XX-XX-XX responsible: XXXXXXXX address: XXXXX,1,2,3 address: 12345 country: XX phone: +11 11 1111111 owner-c: XXX tech-c: XXX abuse-c: XXX inetrev: 111.222/16 nserver: NS.example.com nsstat: 2010XXXX AA nslastaa: 2010XXXX nserver: NS2.example.com nsstat: 2010XXXX AA nslastaa: 2010XXXX created: 2010XXXX changed: 2010XXXX nic-hdl: XXX person: XXXXX e-mail: XXX@example.com address: XXXX 1 2 3 address: 1 XX address: XXXX 1 2 3 address: 1 XX country: XX phone: +XX XX XXXXXXX created: 20010XXXX changed: 2010XXXX % whois.lacnic.net accepts only direct match queries. % Types of queries are: POCs, ownerid, CIDR blocks, IP % and AS numbers. Regards, Fail2Ban
先日アウトレットへ行きました。
買い物をして楽しく過ごす予定でしたが、結果的に自分の体が太っている事を認識する為に行ったようなもので、帰る頃にはがっかり
以前は履けたズボンがきつくて履けませんでした
やばぃやばぃ
運動をしているのに太るって…
最近筋トレさぼっているのでまた再開しないとダメですね
目標はベンチプレスで自分の体重と同じ重さを下まで深く降ろせるようにがんばります
下半身のトレーニングは嫌いなんですが膝強化もしたいのでレッグエクステンションを地道に続けます…
それからこれが一番大切なんですが、原因の間食をやめなくては
#この時期は夏に向けてジムが混むんですよね~
「ドコモwebメール」の提供開始について によれば DoCoMo が Web メールのサービスを開始したみたいです。
engadget 日本版にも掲載されています。
以前から似たような機能があれば便利だと思っていましたが、やっと実現したようですね
実は私は何年も前から同じような事をやってました
普通の PC 用のアドレスを作成して、そのアドレスにメールが届くと、mopera のアドレスにもコピーを送るようにしておきます。
mopera の設定で、メールを着信すると i-mode にショートメールを送るようにできるので、その機能を使って着信を携帯端末に通知するようにしています。
携帯からメールを見る時にはmobileimapで読み書きできます。
独自ドメインが使えるので好きなアドレスを使えて気に行っています
でも絵文字が利用できません
DoCoMo の Web メールは絵文字が使えるのでしょうか
WPMU を利用しているサイトに munin をセットアップしたところ /server-status へのアクセスができなくてはまりました。
http://example.com/server-status へアクセスすると WPMU トップページへmod_rewrite によってリダイレクトされてしまいます
色々なサイトに記載されている設定を試してみましたが思うように行かず mod_rewrite 以外の方法で何とかしようか…と悩んでいたところHF164.comさんの記事を読んで解決できました
# for server-status
RewriteCond %{REQUEST_URI} =/server-status
RewriteRule ^.*$ server-status [L]
久しぶりに Slony-I を色々といじる。
schema を一々入力するのが面倒なのでパスを設定して楽をしたいけど思い出せない
結局思い出すまでに30 分くらいかかってしまった。
次回忘れてしまった時の為にメモ。
SET search_path TO スキーマ,public;