Archive for April, 2016

Setting up GIT Repository

April 15, 2016 Leave a comment

## Create and initialize new repo

$ cd /opt/git
$ mkdir project.git
$ cd project.git
$ git init --bare
Initialized empty Git repository in /opt/git/project.git/
## Necessry, or you might run into permission errors with users trying to "push"
cd /opt/git/project.git
chgrp -R groupname .
chmod -R g+rwX .
find . -type d -exec chmod g+s '{}' +

## On a user's GIT client
# on User's computer
$ cd myproject
$ git init
$ git add .
$ git commit -m 'initial commit'
$ git remote add origin git@gitserver:/opt/git/project.git
$ git push origin master

## clone repo and then push changes:

$ git clone git@gitserver:/opt/git/project.git
$ cd project
$ vim README
$ git commit -am 'fix for the README file'
$ git push origin master
Categories: Linux, Uncategorized

HP-UX fixing device names that change on a VG

April 13, 2016 Leave a comment

In a recent situation when the Physical Device names of a volume group changes and the VG fails to activate/mount, a rescan will be required.

First, backup lvmtab:
mv /etc/lvmtab /etc/lvmtab.old

Next, rescan for the VG information on the disks:
vgscan -a -v

This should create a new lvmtab file and the inactivated VGs should be found. Check lvmtab just in case:
strings /etc/lvmtab

Check the PVlinks information; it should show multiple paths to the same disk (assuming SAN environment):
vgdisplay -v vgxx

Next, activate you VGs that failed previously:
vgchange -a y vgxx

Resync vg information on disk:
lvlnboot -R

Categories: HP-UX, Uncategorized

Setting up RHEL 6 Cluster Fencing on vCenter VMware VMs

April 7, 2016 4 comments

My reference below is based on the posting here (thanks to this author for sharing this invaluable info):

This has been tested and validated on ESXi 5.5, RHEL 6.5 with a 3-node cluster. Was very useful and saved lot of time.



vCenter Account: root (create your own username with similar privileges to stop/restart nodes if you don’t want to use root)

Password: password

node1:  (Named node1 in vCenter)

node2:  (Named node2 in vCenter)

node3:  (Named node3 in vCenter)

Key Tip: fencing may fail using the system name, use UUIDs instead.


Retrieve UUID of your 3-nodes

On, run the following (use ssl or it will not likely retrieve anything):

fence_vmware_soap --ip --username root --password  password --ssl -z --action list |grep node

Note the node and UUID associated with it.


Test fencing from node1 to node3:

fence_vmware_soap --ip --username root --password password -z --action off --uuid 564d2c92-23d6-6094-2bc4-ff503470cdec
fence_vmware_soap --ip --username root --password password -z --action on --uuid 564d2c92-23d6-6094-2bc4-ff503470cdec

After successful tests, add Fencing in LUCI:


  • Add a fence device that tells your cluster how to log into your VC
  • Attach a fencing method to each node and give it the UUID you used earlier to

Log into LUCI and select your cluster, then select the Fence Devices tab.  Select Add.

Fill out the form exactly as shown:

Fence type: VMWare (SOAP Interface)

Name: fence_node1  (Just needs to be descriptive)

IP Address or Hostname:

IP Port (optional): blank

Login: root

password: password

Leave the rest as they are or blank

Now, go to Manage Clusters in LUCI and select your first node by clicking on the name. At the bottom of the screen for your node, select Add Fence Method.  Give it a name, the name doesn’t matter unless you are planning on using multiple methods.  Submit your change.  Now select Add Fence Instance that appears inside the method box and fill it out exactly as described below:

Select the fencing device you configured in step 1

VM Name: Leave blank

VM UUID: 564dbfa6-7885-b25f-5812-4dae4269a1d6

Use SSL: Check it on.  Fencing will not work without this checked.


Do the same for node2, node3. Check the bottom of this dialog for each node while your here and verify that all your required daemons are running before testing fencing.

Categories: Uncategorized