Thursday, January 5, 2012

Add static route to linux

add a remote host

remote host
local gateway
route add -host gw

add a remote network

route add -net netmask gw
check the route 
route -n
Delete a route
route del -net netmask gw
route add -net netmask dev eth0
adds a route to the network 192.56.76.x via "eth0". The Class C netmask modifier is not really necessary here because 192.* is a Class C IP address. The word "dev" can be omitted here.
To make the routing information persistent, add the “route add” line as seen above into the /etc/rc.local file.
Sample /etc/rc.local file.
or /etc/rc.d/rc.local

touch /var/lock/subsys/local
route add -net netmask gw



Wednesday, January 4, 2012

Error : Root File System Is Read-Only | linux based file system become read only

As a workaround, remount the Linux file system using this command to return it to the proper state:
mount -o remount /

Remount it. If /etc/fstab is correct, you can simply type:

mount -n -o remount /

If /etc/fstab is wrong, you must give the device name and possibly the
type, too: e.g.

mount -n -o remount -t ext2 /dev/hda2 /

VMware has identified a problem where file systems may become read-only after encountering busy I/O retry or SAN or iSCSI path failover errors.
The same behavior is expected even on a native Linux environment, where the time required for the file system to become read-only depends on the number of paths available to a particular target, the multi-path software installed on the operating system, and whether the failing I/O was to an EXT3 Journal. However, the problem is aggravated in an ESX host environment because ESX host manages multiple paths to the storage target and provides a single path to the guest operating system, which effectively reduces the number of retries done by the guest operating system.
These guest operating systems are affected:
  • RHEL5 (RedHat)
  • RHEL4 U6
  • RHEL4 U4
  • RHEL4 U3
  • SLES10
  • SLES9 SP3
  • Ubuntu 7.04 

    Note: This issue may affect other Linux distributions based on early 2.6 kernels as well, such as Ubuntu 7.04.