Set up a postgres 9.1 Replication (mirror) database server in ubuntu 10.04

Posted on Monday, April 23, 2012



Setting up postgres Replication


I have a need to set up a Postgres Replication Database.   In Postgres 9.0+  they have the ability to have a read only replicated database that mirrors the live database, it can lag slightly behind the live database (although in my simple test it was spot on).  The Replication DB can be read from but not written to.  In my particular case I just want to use it as a failover DB that can be brought up as a live DB if ever needed.

Here is my set up.  I have two Ubuntu 10.04 LTS 64 bit servers with postgresl 9.1 installed.  I wrote an article that shows how to install postgres 9.1 on Ubuntu 10.04 (LTS).  One of these servers will be the primary (master) postgres server and the other will be the replication (slave) postgres server.   I have a large postgres database already north of 100 GiB this is my Primary (master) server.  This is a live server, I can reboot it, but it cannot be down for an hour or more.    This is a test procedure I came up with to test first before I do it on my live server.  In this procedure I have a copy of my live database and I create a test database to confirm the replication is working.

Cygwin dig command

Posted on Thursday, April 19, 2012


I used Cygwin a lot and I love it.  But Last time I did a search in the Cygwin setup for “dig” I get nothing.






















See nothing…

Well it turns out DIG is in in there somewhere

Quick Overview of Amazon AWS cloud services

Posted on Sunday, April 15, 2012






This guide was created on 4/15/2012  an updated guide is at

http://www.whiteboardcoder.com/2012/12/quick-overview-of-amazon-aws-cloud.html 

ESXi 5 Add USB to VM (USB passthrough)

Posted on Friday, April 13, 2012



I need to set up my ESXi 5.0 server to allow USB passthrough to the virtual machines.  In short I want to attach a USB hard drive to the physical ESXi server and have it show up in the Virtual machine as a mounted usb hard drive.

To do this first make sure your CPU and hardware support intel VT-d technology.  I have a CPU that has VT-x which does help with Virtual machines but you need VT-d to get I/O support to your virtual machines.   The particular machine I am working on has a xeon E5530 processor which if you go to its product page http://ark.intel.com/products/40200?wapkw=E5520 [1] and look around you will find this.



Word 2010 VB Macro to save all Images from a doc to a folder

Posted on Thursday, April 12, 2012



This is my attempt to save all the images from a word document to a folder.   I write my blog posts in a word document first , for many different reasons, then I transfer them here.  As part of that I need to convert all my images in my word doc to png image files.   I have been doing it one at a time right clicking and clicking "Save picture as"  but this is tedious, so I came up with this VB script to do it.  Its not perfect, but for my purposes it works great.


Install Postgres 9.1 on Ubuntu 10.04 (LTS)

Posted on Wednesday, April 11, 2012



I recently had to install postgres 9.1 on Ubuntu 10.04 server.  Currently it is not available via apt-get.  

So poking around I found 2 good sites showing how to accomplish this task  http://netadminlinux.blogspot.com/2011/11/installing-postgresql-91-on-ubuntu-1104.html [1] and


Change the Postgres data_directory folder location



I recently had to install postgres 9.1 on a server and move a large database over to it.   The machine this is running on is an Ubuntu 64 bit server running on a ESXi VMware server.  As such, I decided to add an extra hard drive to the Ubuntu server and put the database files there.    Here are the steps I used to accomplish that.


First determine where the current data_directory is (the database folder)

ESXi 5 Add second datastore

Posted on Saturday, April 7, 2012



I have an ESXi 5.0 server running here at my house which runs on a box with a single 2TB Hard drive and one datastore.   I wanted to see if I could add a second hard drive and make a second datastore.  Here are the steps I used to make it happen.

Stop the server install a second hard drive and rebooted the ESXi 5 server.

Open up vSphere Client and connect to the ESXi server.
Select the Server.

ESXi 5 : Increasing the size of a virtual disk and grow the partition in Ubuntu

Posted on Friday, April 6, 2012



I have an Ubuntu 10.04 Desktop running as a VM image in an ESXi 5 server.  It has a second virtual hard drive that is 50 GiB in size.   I want to increase the size of the virtual disk and grow the partition.





ESXi 5 vSphere Ubuntu VM, adding a second hard drive

Posted on Thursday, April 5, 2012



I have an Ubuntu 10.04 Desktop running as a VM image in an ESXi 5 server.  I want to add a second hard drive to it format it and mount it.  Here is a simple how to.

First open up vSphere Client and login to your ESXi 5 server.


Set up the Boot order of your Virtual Machines in VMware ESXi 5

Posted on Wednesday, April 4, 2012



After you have your virtual servers installed on an ESXi 5 server you will probably want to set up how they boot up if and when ESXi itself reboots.    The default is to do nothing, which would result in all your VMs being off after a reboot of the ESXi box.   Here is how you fix that.

Open up VSphere Client and login to your ESXi server.

From here click on the Configuration tab then click on the “Virtual Machine Startup/Shutdown” button on the lower left.