Category Archives: Uncategorized

mdadm disk failure recovery

mdadm –detail /dev/md0

mdadm /dev/md0 –fail /dev/sdb –remove /dev/sdb

mdadm –add /dev/md0 /dev/sdb

psql help

postgres=# help
You are using psql, the command-line interface to PostgreSQL.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

postgres=# \?
General
\copyright show PostgreSQL usage and distribution terms
\g [FILE] or ; execute query (and send results to file or |pipe)
\h [NAME] help on syntax of SQL commands, * for all commands
\q quit psql

Block Incoming IP Using dd-wrt (iptables)

While reviewing logs on the email server I noticed 112.121.136.26 trying to authenticate via SASL.
This is not a normal IP that would be relaying email through the server, so I decided to block it at the firewall.
Undoubtedly, someone was trying to relay spam, whether they were aware or not.

First, I logged into my firewall via ssh to get a rule in place immediately:

iptables -I CHAIN -s 112.121.136.26 -j DROP

Listing the rules:

iptables -L --line-number

1 DROP 0 -- ppp-112.121.136.26.revip.proen.co.th anywhere

Shows the new rule at the top of the chain. Exactly where I need it.

HTC Sync Issue when VMware is Installed

HTC Sync fails to recognize the phone when a VMware virtual machine is running.

This is because the VMware USB Controller default setting is to “Automatically connect new USB devices” to the virtual machine. When this is done the phone is connected as a drive which does not allow syncing.

To avoid this behavior, just un-check the selection box and reboot the virtual machine.

The casualties of a datacenter?

So we find ourselves with another word stolen. Another buzz word birthed from the already mangled English language.

I bring you “triage”. Bug Triage (Ars Technica.. GUILTY), Outage Triage, etc. It will become widespread in the IT industry. Watch and wait.

The last time I used the word triage was when I was learning to sort casualties of battle as a medic’s assistant.