Archive for the ‘Linux’ Category.
30th October 2009, 10:51 pm
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
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…
7th June 2009, 11:48 am
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 =)
17th May 2009, 07:23 pm
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… =)
26th January 2009, 03:25 am
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 …
18th January 2009, 07:59 pm
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”.
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…
9th December 2008, 12:37 am
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…
6th October 2008, 10:33 am
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…
30th August 2008, 06:16 pm
I got a server yesterday and the onboard driver does not seems to work with CentOS and I found out that this require manual installations of the network driver to get it working.
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12)
Subsystem: ASUSTeK Computer Inc. Unknown device 826e
Flags: bus master, fast devsel, latency 0, IRQ 145
Memory at fbefc000 (64-bit, non-prefetchable) [size=16K]
I/O ports at d800 [size=256]
Expansion ROM at fbec0000 [disabled] [size=128K]
Capabilities: [48] Power Management version 3
Capabilities: [50] Vital Product Data
Capabilities: [5c] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable-
Capabilities: [e0] Express Legacy Endpoint IRQ 0
You need to get yourself on the internet first, so you can slot in a PCI network card for the time being while you load the drivers.
Download the driver from http://www.marvell.com/drivers/search.do
Install the tools required to compile
yum install gcc gcc-c++ kernel-devel patch which make bzip2
Unzip the driver file downloaded from Marvell
bunzip2 install_v10.61.3.3.tar.bz2|tar xvf -
cd DriverInstall/
Execute the installations command
sh install.sh (Choose “1″ then “Y”)
Now load the modules and you should get the output as shown
modprobe sk98lin
lsmod|grep sk98lin
[root@localhost ~]# lsmod | grep sk98lin
sk98lin 166740 1
Finally you should be able to see the interface settings
ethtool eth1
Enjoy!
24th August 2008, 01:05 am
Well, I was trying to install a CLI for a RAID controller and I bump into this slight problem which stall me for around 15 mins.
Problem:
error: Failed dependencies:
libstdc++-libc6.2-2.so.3 is needed by StorMan-4.00-00.i386
Solution:
wget http://mirror.averse.net/centos/5/os/i386/CentOS/compat-libstdc++-296-2.96-138.i386.rpm
rpm -ivh compat-libstdc++-296-2.96-138.i386.rpm
Hope this helps …
16th June 2008, 01:14 am
Today is the third time I bump into another motherboard that is using the new Ethernet driver in Linux. Well, in order to prevent future headache for me.
1) wget ftp://202.65.194.211/cn/nic/r8168-8.006.00.tar.bz2
2) bunzip2 -cd r8168-8.006.00.tar.bz2|tar xvf -;cd r8168-8.006.00
3) make
4) depmod -a
5) insmod ./src/r8168.ko
6) lsmod | grep r8168 (It should return the following result)
[root@localhost ~]# lsmod | grep r8168
r8168 34708 0
7) ifconfig -a
Hope this helps someone out there