Archive for May 29, 2013

Skip or Bypass a Fsck on boot

 

method 1:

Temp: on boot

from GRUB Menu selecy kernel line and press e  then add fast boot at the end of the line , press ENTER and Press  to boot

Permanent:

/boot/grub/grub.conf

Find kernel line and put fastboot at the end of the kernel line. In the end it should look as follow:
kernel /vmlinuz-2.6.18-92.1.22.el5 ro root=LABEL=/ console=tty0 console=ttyS1,19200n8 fastboot

 

method 2:

. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked. Here is sample entry:

/dev/sdb1               /mnt/sdb1               ext3    defaults        0 0

Clean mail queue- Sendmail

sendmail

You can cd to /var/spool/mqueue and delete all files if you want to get rid of all messages in the queue:
# cd /var/spool/mqueue/
# ls
# rm *

How to find disk I/O performance in Linux

Hard-Disk

Command

10 = 10 seconds interval

#iostat 10

Result
avg-cpu: %user %nice %system %iowait %steal %idle

0.55 0.00 0.03 0.21 0.00 99.22

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 15.27 0.16 162.70 1787038 1770815888

Download of the day: Half-Life 2 For Steam on Linux

The first-person shooter Half-Life 2 released for Steam on Linux. I truly enjoyed Counter Strike, and I am going to install Half-Life 2 this weekend.

Read more: "Download of the day: Half-Life 2 For Steam on Linux"

Tweet this    Share on Facebook

setup multi default gateway under linux

setting-default-route

If you need to configure a linux in different network with different gteway this howto is for you.

I present you a solution to do the multi default gateway under linux based on iproute2 commande line.

Schema example :

Step 1 :

Creation of the table definition in iproute2:

root# cat /etc/iproute2/rt_tables

# reserved values
#
255 local
254 main
253 default
0 unspec

200 t1
201 t2
#
# local
##1 inr.ruhep

In this file a i have add 2 entries :

200 t1
201 t2

Now we have to define the routing workflow for the different interface and network.

ip route add 10.2.0.0 dev eth0 src 10.2.0.100 table t1
ip route add 10.1.0.0 dev eth1 src 10.1.0.10 table t2

We have to define the default route on the routing table:

ip route add default via 10.2.0.1 table t1 ip route add default via 10.1.0.1 table t2

This part allow the routing to the direct neigbor over the good interface :

ip route add 10.2.0.0 dev eth0 src 10.2.0.1
ip route add 10.1.0.0 dev eth1 src 10.1.0.1

This part define the preference on the default gateway :

ip route add default via 10.2.0.1

Now you have to configure the routing rules :

ip rule add from 10.1.0.10 table t1 ip rule add from 10.2.0.100 table t2

If you have more than 1 ip addres on the interface you have to make a rule also on it

ip rule add from 10.1.0.11 table t1

The last section is important to allow the incomming on each interface

ip route add 127.0.0.0/8 dev lo table t1
ip route add 127.0.0.0/8 dev lo table t2
ip route add 10.2.0.0 dev eth0 table t2
ip route add 10.1.0.0 dev eth1 table t1

 

Now we have a configuration for your 2 ISP, but if you want to use a local network, you have to add it like in the last section present above.

Tips and tricks

If you want to balance the outgoing traffic between those interfaces, you have to applie a load balancing rules like that :

ip route add default scope global nexthop via 10.2.0.1 dev eth0 weight 1 nexthop via 10.1.0.0 dev eth1 weight 1

If you lose the parametter after each reboot, you can see to put all this in the rc.local file.

 

 

courtesy: http://www.generationip.com/documentation/network-documentation/93-howto-setup-multiple-default-gateway-on-linux