Monthly Archives: February 2012

Editing corosync config with VIM

This also works when you’re getting the error “id is already in use”.

First, display config: crm configure show

Then edit config:
crm configure
edit
[make your changes, save and quit]

Then commit config:
commit

Then exit crm configure and check your configuration again
quit (or Ctrl+C)
crm configure show

XenServer install one-off CentOS packages (aka install a package from a disabled repo with yum)

This is not specific to XenServer, or to CentOS, but it was what I was trying to do at the time.

XenServer, by default, only has the Citrix repository enabled, so there will be lots of packages you can’t install.

If you want to install a package but don’t want to enable the CentOS repository, you can use the following command:

yum –enablerepo=base install mutt

This installs mutt from the base repo.  If you want a list of available repos, you can do the following:

yum repolist disabled

Example output:

[root@testxenserver yum.repos.d]# yum repolist disabled
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id                         repo name                               status
addons                          CentOS-5 – Addons                       disabled
base                            CentOS-5 – Base                         disabled
c5-media                        CentOS-5 – Media                        disabled
centosplus                      CentOS-5 – Plus                         disabled
contrib                         CentOS-5 – Contrib                      disabled
extras                          CentOS-5 – Extras                       disabled
updates                         CentOS-5 – Updates                      disabled
repolist: 0

And to see enabled repos:

[root@testxenserver yum.repos.d]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id                   repo name                                   status
citrix                    XenServer 5.6.100 updates                   enabled: 0
repolist: 0

Openfiler 2.99 iSCSI SR backend failed to complete

Check your ACL.  I was using a netmask of 255.255.0.0, and couldn’t get this error to go away until I specified particular IPs with netmask of 255.255.255.255.

Also, after updating the system ACL, go back to the iSCSI target ACL and just ‘update’ on the host allow page.  This page was showing the new IPs for me, but the config file on the server (/etc/initiators.allow) was out of date until I updated.

Checking all open ports on a network using nmap

nmap -n 10.0.0.1/24 -PS

This will give you something similar to the following:

 

Nmap scan report for 10.0.0.1
Host is up (0.00082s latency).
Not shown: 993 closed ports
PORT     STATE    SERVICE
20/tcp   filtered ftp-data
21/tcp   filtered ftp
80/tcp   open     http
443/tcp  open     https
2602/tcp open     ripd
5000/tcp open     upnp
5100/tcp open     admd

Nmap scan report for 10.0.0.12
Host is up (0.00022s latency).
Not shown: 993 filtered ports
PORT      STATE SERVICE
80/tcp    open  http
135/tcp   open  msrpc
139/tcp   open  netbios-ssn
445/tcp   open  microsoft-ds
2869/tcp  open  unknown
3389/tcp  open  ms-term-serv
49154/tcp open  unknown

Nmap scan report for 10.0.0.17
Host is up (0.00031s latency).
All 1000 scanned ports on 10.0.0.17 are closed

Nmap scan report for 10.0.0.20
Host is up (0.013s latency).
Not shown: 999 closed ports
PORT      STATE SERVICE
62078/tcp open  iphone-sync

Nmap scan report for 10.0.0.37
Host is up (0.00017s latency).
Not shown: 999 closed ports
PORT   STATE SERVICE
80/tcp open  http