Detecting Duplicate IP Address using arping

I have been facing a loss of connection suddenly, so I am suspecting that some host on the network is using the same IP address with me.

So I used this tool called arping.

Let’s said I want to check whether 192.168.1.1 is configure on more than 1 host. You need to test it on another machine which is not configure as 192.168.1.1

[svr1:/root]# arping -I eth0 -c 3 192.168.1.1
ARPING 192.168.1.1 from 192.168.1.99 eth0
Unicast reply from 192.168.1.1 [00:0D:A2:02:3B:53] 1.090ms
Unicast reply from 192.168.1.1 [00:0D:A2:02:3B:53] 0.837ms
Unicast reply from 192.168.1.1 [00:0D:A2:02:3B:53] 1.031ms
Sent 3 probes (1 broadcast(s))
Received 3 response(s)

As you can see, the host that response has the same mac address means this IP address is not conflict with any of the host on the network.

To simplify things, you can use this single command that uses “Duplicate address detection mode (DAD)”.

[svr1:/root]# arping -D -I eth0 -c 3 192.168.1.1 >/dev/null;echo $?
1

If you get “0″, it means that the IP address has conflict with another host

    or

it also means that there is no host in the network configured on the IP address.

So I got “1″ on the IP address I am trying to detect, it looks like IP conflict is not a issue here for me.

Hope this helps someone…

Protected: Exim Manual Route

This post is password protected. To view it please enter your password below:


Kloxo lxadmin reset password

To reset lxadmin, you can do through SSH with just two commands.

cd /usr/local/lxlabs/lxadmin/httpdocs
lphp.exe ../bin/common/resetpassword.php master mypassword

Enjoy!

Force fsck on reboot

Sometimes if you suspect your file system is corrupted, you might want to run fsck to check against the file system. You just need to create a simple file at the root partition.

touch /forcefsck
reboot

Simple and easy =)

Manager of pid-file quit without updating file

[adserver1:~]# service mysql start
Starting MySQL..Manager of pid-file quit without updating file [FAILED]

A silly mistake by me as I forget to disable the selinux after a fresh installation of a ad server =)

Hope this helps …

Dell: No controllers found.

I am running some random check on the system that I handle. One of the Dell server controller is undetectable for unknown reason.

[svr3:/root]# omreport storage controller
No controllers found.

Before you start to panic, run the following command

modprobe mptctl
/etc/init.d/dataeng restart

Now try to execute the controller status command again.

[svr3:/root]# omreport storage controller
Controller SAS 6/iR Adapter (Slot 1)

Controllers
ID : 0
Status : Ok
Name : SAS 6/iR Adapter
Slot ID : PCI Slot 1
State : Ready
Firmware Version : 00.25.47.00.06.22.03.00
Minimum Required Firmware Version : Not Applicable
Driver Version : 3.04.05
Minimum Required Driver Version : Not Applicable
Number of Connectors : 2

Hope this helps… =)

NTFS read/write in Linux

Accessing NTFS parition via Linux is pretty simple. Here is the steps to get it running in less than 10 mins :)

Let’s install some basic stuff.

1
yum install gcc gcc-c++ make kernel-devel

Setup Fuse

1
2
3
4
5
6
wget http://jaist.dl.sourceforge.net/sourceforge/fuse/fuse-2.7.4.tar.gz
tar zxvf fuse-2.7.4.tar.gz
cd fuse-*
./configure
make
make install

Next, download NTFS-3G from here

1
2
3
4
5
6
wget http://www.ntfs-3g.org/ntfs-3g-2009.1.1.tgz
tar zxvf ntfs-3g-2009.1.1.tgz
cd ntfs-3g-*
./configure
make
make install

Last but not least

1
2
3
modprobe fuse
mkdir /windows
 mount -t ntfs-3g /dev/sdb1 /windows

You can then read/write your windows partition from /windows ;)

Hope this helps … :)

Dell OMSA and R300 issue

Well, today I was deploying my Dell R300 happily when I run into some trouble.

I setup Dell OpenManage Server Administrator (OMSA) based on the instructions here.

wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash

After which, I execute this command but it complain that “No package srvadmin-all available”.

yum install srvadmin-all

After 1 hour of troubleshooting, I found a way to install OMSA.

The latest version at this point of writing for OSMA is 5.5, I have to force to install 5.4.1 first.

wget -q -O - http://linux.dell.com/repo/hardware/OMSA_5.4.1/bootstrap.cgi | bash
yum install srvadmin-all

This will works for now. Grab a coffee and wait for it to finish installing first.

After you have installed 5.4.1, let’s upgrade to 5.5 now.

cd /etc/yum.repos.d/
sed -ie 's#OMSA_5.4.1#latest#' dell-hw-specific-repository.repo dell-hw-indep-repository.repo

Before you update, let’s make sure the srvadmin services is not running first.

srvadmin-services.sh status

Now, let’s update now and check the latest version :)

yum update
rpm -qa|grep srvadmin-all

Expected result:

[svr3:/root]# rpm -qa|grep srvadmin-all
srvadmin-all-5.5.0-364

Let’s start your OMSA and ready to go.

srvadmin-services.sh start

Visit your OMSA at https://IP-ADDRESS:1311/

Enjoy and hope this helps…

Bad Move!

Today when I am deploying openvz machine, I activate the Linux Quota as I have some shell users throwing files on the machine. As such, this cause some issues when I reboot the machine (I always do this to simulate a remote reboot to see how well does the system react to keyboard errors and etc…)

After a successful reboot, I look at the Container status and I’m shocked to see all of the container are stopped. I try to start it up but I got the following error.

[svr2:/root]# vzctl start 210
Starting container …
vzquota : (error) Quota on syscall for id 210: File exists
vzquota on failed [3]

Immediately, I turn off the quota and remount the partition without any usrquota,grpquota. Bad move to activate Linux Quota on the host node as openvz has it’s own quota system running to keep track of disk space used by each of the container.

I guess I just need to create a VPS just to store my shell users ;)

Hope this helps…

cPanel SpamAssassin issue

Bump into this slight issues when checking my development server box.

Can’t locate Cpanel/SpamAssassinSandBox.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/x86_64-linux /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.6.2 /usr/lib/perl5/site_perl) at /usr/bin/spamd line 27.
BEGIN failed–compilation aborted at /usr/bin/spamd line 27.

Solution:

/scripts/perlinstaller –force Mail::SpamAssassin
/scripts/restartsrv_spamd
/scripts/restartsrv_exim

Hope this helps… :)