Kmaiti

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 5 August 2011

Why device name chaged after update the system or how to use UUID for device?

Posted on 04:23 by Unknown
This problem can be avoided through the use of UUIDs (universally unique identifiers) instead of traditional block device names (/dev/hda1, /dev/hda5, /dev/sdb) to uniquely identify harddisk or other storage media. This is because UUIDs are unique and never change even if you switch the harddisk ordering. Follow these steps to use existing UUIDs to identify your storage devices.

1. List the UUIDs of block devices

Use the blkid command-line utility to locate/print block device attributes:

# blkid
/dev/sda3: LABEL="SWAP-sdb3" TYPE="swap"
/dev/sda2: LABEL="/" UUID="f52529cb-a959-4a11-8d43-0e4fd8fdecd2" TYPE="ext3"
/dev/sda1: LABEL="/boot" UUID="15721694-cc09-4b79-baf0-e56f128676c3" TYPE="ext3"



Another method which works universally on systems is:

# ls -al /dev/disk/by-uuid
lrwxrwxrwx 1 root root 10 Sep 29 13:35 15721694-cc09-4b79-baf0-e56f128676c3 -> ../../sda1
lrwxrwxrwx 1 root root 10 Sep 29 13:35 f52529cb-a959-4a11-8d43-0e4fd8fdecd2 -> ../../sda2



2. Use UUID in the grub.conf file:

The system identifies the root partition on the kernel line in grub.conf. RHEL 5 uses disk labels or device names by default:
(This is an example)

title Red Hat Enterprise Linux Server (2.6.18-128.el5PAE)
root (hd0,0)
kernel /vmlinuz-2.6.18-128.el5PAE ro root=LABEL=/
initrd /initrd-2.6.18-128.el5PAE.img

or

kernel /vmlinuz-2.6.18-128.el5PAE ro root=/dev/sda2


If the LABEL or block device name of the root drive changes, it will throw a kernel panic.


We can use the UUID of root partition in grub.conf to avoid this problem:

kernel /vmlinuz-2.6.18-128.el5PAE ro root=UUID=f52529cb-a959-4a11-8d43-0e4fd8fdecd2



3. Use UUID in the /etc/fstab file:

A typical /etc/fstab entry would look something like this:

/dev/sda2 / ext3 defaults 1 1



or

LABEL=/ / ext3 defaults 1 1



Under the new system, the same entry would look something like this:

UUID=f52529cb-a959-4a11-8d43-0e4fd8fdecd2 / ext3 defaults 1 1


The only difference is the first entry in the table. Instead of /dev/sda1 or LABEL, the UUID f52529cb-a959-4a11-8d43-0e4fd8fdecd2 now designates the drive. Because of this, it wouldn't matter if the drive were moved and became /dev/sdb1; the root drive would still mount and function as expected.

try.
Read More
Posted in | No comments

Thursday, 4 August 2011

How to disable MSI at network driver level?

Posted on 10:05 by Unknown
Use following commands :

#insmod bnx2.ko disable_msi=1
#modprobe bnx2 disable_msi=1

bnx2 is driver here. So, you need to replace it.
Read More
Posted in | No comments

Friday, 29 July 2011

Details about NFS timeout on Red Hat Enterprise Linux 5

Posted on 12:39 by Unknown
There are two mount options for timeouts of an NFS request.

# timeo: a timeout value. the unit is 1/10 seconds.
# retrans: a retrans count.

An NFS client waits an RPC response for timeo before issuing an RPC request. If the request is timed out, the NFS client retransmits the request and waits a response again for tomeo*2. The timeout valueis doubled until it reachs a maximum value. The maximum timeout is timeo*(retrans+1) in TCP, is NFS_MAX_UDP_TIMEOUT in UDP. The RPC timeout is called minor timeout. If the timeout reaches maximum timeout, the NFS request is timeout. That timeout is called major timeout. The default value of timeo is 60 seconds in TCP, is 1.1 seconds in UDP, and the default value of retrans is 2 in both of TCP/UDP. The maximum value of timeo is NFS_MAX_TCP_TIMEOUT in TCP, is NFS_MAX_UDP_TIMEOUT in UDP, and NFS_MAX_TCP_TIMEOUT is 600 seconds, and NFS_MAX_UDP_TIMEOUT is 60 seconds.

Capture packets using tcpdump to troubleshoot NFS issue. Like :

#tcpdump -vv -s 0 -i ethX -w /tmp/printdump_server.cap host {hostname or IP address of client/server}

Replace ethX, and IP of server/client. Packets must be captured at the same time on client and nfs server. Then analysis it using wireshark.

Try :)
Read More
Posted in | No comments

Tuesday, 26 July 2011

How to check or read email with telnet

Posted on 14:51 by Unknown
Do following :

#telnet example.com 110
#user username@example.com
#pass yourpasswordgoeshere
#list
#retr id
#dele id

quit

Done
Read More
Posted in | No comments

How to check or read email with telnet

Posted on 14:49 by Unknown
Do following :

#telnet example.com 25
#ehlo example.com
#mail from: username@example.com
#rcpt to: friend@hotmail.com, friend2@yahoo.com
#data
Subject: My Telnet Test Email

Hello,

This is an email sent by using the telnet command.

Your friend,
Me

.

done
Read More
Posted in | No comments

Tuesday, 19 July 2011

How linux calls happens while it starts ?

Posted on 13:06 by Unknown
We start the Linux kernel first from C code executed from ''startup_32:'' asm label:

|startup_32:
|start_kernel
|lock_kernel
|trap_init
|init_IRQ
|sched_init
|softirq_init
|time_init
|console_init
|#ifdef CONFIG_MODULES
|init_modules
|#endif
|kmem_cache_init
|sti
|calibrate_delay
|mem_init
|kmem_cache_sizes_init
|pgtable_cache_init
|fork_init
|proc_caches_init
|vfs_caches_init
|buffer_init
|page_cache_init
|signals_init
|#ifdef CONFIG_PROC_FS
|proc_root_init
|#endif
|#if defined(CONFIG_SYSVIPC)
|ipc_init
|#endif
|check_bugs
|smp_init
|rest_init
|kernel_thread
|unlock_kernel
|cpu_idle

* startup_32 [arch/i386/kernel/head.S]
* start_kernel [init/main.c]
* lock_kernel [include/asm/smplock.h]
* trap_init [arch/i386/kernel/traps.c]
* init_IRQ [arch/i386/kernel/i8259.c]
* sched_init [kernel/sched.c]
* softirq_init [kernel/softirq.c]
* time_init [arch/i386/kernel/time.c]
* console_init [drivers/char/tty_io.c]
* init_modules [kernel/module.c]
* kmem_cache_init [mm/slab.c]
* sti [include/asm/system.h]
* calibrate_delay [init/main.c]
* mem_init [arch/i386/mm/init.c]
* kmem_cache_sizes_init [mm/slab.c]
* pgtable_cache_init [arch/i386/mm/init.c]
* fork_init [kernel/fork.c]
* proc_caches_init
* vfs_caches_init [fs/dcache.c]
* buffer_init [fs/buffer.c]
* page_cache_init [mm/filemap.c]
* signals_init [kernel/signal.c]
* proc_root_init [fs/proc/root.c]
* ipc_init [ipc/util.c]
* check_bugs [include/asm/bugs.h]
* smp_init [init/main.c]
* rest_init
* kernel_thread [arch/i386/kernel/process.c]
* unlock_kernel [include/asm/smplock.h]
* cpu_idle [arch/i386/kernel/process.c]

The last function ''rest_init'' does the following:

1. launches the kernel thread ''init''
2. calls unlock_kernel
3. makes the kernel run cpu_idle routine, that will be the idle loop executing when nothing is scheduled

In fact the start_kernel procedure never ends. It will execute cpu_idle routine endlessly.

Follows ''init'' description, which is the first Kernel Thread:

|init
|lock_kernel
|do_basic_setup
|mtrr_init
|sysctl_init
|pci_init
|sock_init
|start_context_thread
|do_init_calls
|(*call())-> kswapd_init
|prepare_namespace
|free_initmem
|unlock_kernel
|execve
=========
Read More
Posted in | No comments

How to use ethtool ?

Posted on 13:02 by Unknown
#ethtool -g|--show-ring eth0
#ethtool -A ethX [autoneg on|off] [rx on|off] [tx on|off]
#ethtool -c|--show-coalesce ethX
#ethtool -C|--coalesce ethX //change coalesce values

To avoid flooding the host system with too many interrupts, packets are collected and one single interrupt is generated for multiple packets. This is called interrupt coalescing.

#ethtool -G|--set-ring ethX [rx N] [rx-mini N] [rx-jumbo N] [tx N]
#ethtool -i|--driver ethX
#ethtool -k|--show-offload ethX
#ethtool -K|--offload ethX [rx on|off] [tx on|off] [sg on|off] [tso on|off] [ufo on|off] [gso on|off] [gro on|off] [lro on|off]
#ethtool -S|--statistics ethX //Queries the specified ethernet device for NIC- and driver-specific statistics.
#ethtool -t|--test ethX [offline|online]
#ethtool -s ethX speed N [duplex half|full] [port tp|aui|bnc|mii] [autoneg on|off] [advertise N] [phyad N] [xcvr inter-
nal|external] [wol p|u|m|b|a|g|s|d...] [sopass xx:yy:zz:aa:bb:cc] [msglvl N]
Read More
Posted in | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • [a fatal error or timeout occurred while processing this directive] + cpanel
    Guys, Just check the cpanel log file and you'll get the clue from there. I got following messages : execute : tail -f /usr/local/cpanel/...
  • How to verify UDP packet communication between two linux system?
    Guys, Today, I had to check UDP packet communication between linux and a windows system. Main purpose of the windows system was to capturing...
  • How do I determine if my x86-compatible Intel system is multi-processor, multi-core or supports hyperthreading?
    Guys, We need to know about multi-processor, multi-core or supports hyperthreading. Here are the details : Physical ID (Physical processor o...
  • NDMP communication failure error
    Guys, Issue : Netbackup server sends alert NDMP communication failure once everyday. But there is no issue to run scheduled backup jobs. Env...
  • How to store sftp log messages in custom file on RHEL 6?
    How to setup chrooted sftp account on RHEL 6? $groupadd sftponly $$useradd user123 $usermod -d /myhome -g sftponly -s /bin/false user123 $mk...
  • configure: error: This c-client library is built with Kerberos support
    Guys, I got the error message during executing easyapache. I have manually recompiled the php on cpanel server. Here is the script that I ha...
  • New posts are coming soon..
    Hi Guys, It's been a long time I didn't post any article or issue here. There were few transitions in my career and I was bit busy. ...
  • How to enable php in apache on RHEL ?
    1. In order to enable php engine in apache, you should make sure php is installed in the system first. Then refer following steps : locate l...
  • WHM + http showing failed ?
    Guys, Please check the log of the apache server like : 1. tail -f /usr/local/apache/logs/error_log 2. check the http port in /usr/local/apac...
  • How to access the webalizer from the outside of the cpanel?
    Guys, I don't want to post this type of article since you'll get it from the Google. But still I did. I followed following steps : E...

Categories

  • ACL
  • ESX
  • Linux
  • Storage
  • UCS

Blog Archive

  • ▼  2013 (5)
    • ▼  May (1)
      • NDMP communication failure error
    • ►  April (3)
    • ►  February (1)
  • ►  2012 (10)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ►  2011 (86)
    • ►  December (3)
    • ►  November (2)
    • ►  September (19)
    • ►  August (9)
    • ►  July (5)
    • ►  June (9)
    • ►  May (12)
    • ►  April (3)
    • ►  March (4)
    • ►  February (5)
    • ►  January (15)
  • ►  2010 (152)
    • ►  December (9)
    • ►  November (34)
    • ►  October (20)
    • ►  September (14)
    • ►  August (24)
    • ►  July (19)
    • ►  June (3)
    • ►  May (25)
    • ►  April (3)
    • ►  January (1)
Powered by Blogger.