How to find WWPN of HBA on RedHat 6.x

Method 1)

To Find all HBA insterface on your system:

lspci -nn | grep -i hba

To Identify the WWPN(s):

ls -lrt /sys/class/fc_host/host[0-9]*/port_name

To Check the WWPN(s) number(s):

cat /sys/class/fc_host/host[0-9]*/port_name

Method 2)

Download and install the following packages:

rpm -ivh libsysfs-2.1.0-6.1.el6.x86_64.rpm
rpm -ivh sysfsutils-2.1.0-6.1.el6.x86_64.rpm

or

yum install sysfsutils

Find the device(s) attached to your system

ls -lrt /sys/class/fc_host/host[0-9]/port_name

To find FC HBA info on your system

systool -c fc_host -v -d hostx (example systool -c fc_host -v -d host5)

To find SCSI adapter info on your system

systool -c scsi_host -v -d hostx (example systool -c scsi_host -v -d host5)
You’re done!

Comments Off on How to find WWPN of HBA on RedHat 6.x Posted in Linux, RedHat

How to load data from file into table

If you want to load data into a table from a local file, do as follow:

load data local infile ” into table table_name fields terminated by ” lines terminated by ”;

example:

load data local infile ‘/input/data’ into table TEMPLATE fields terminated by ‘,’ lines terminated by ‘\n’;

Comments Off on How to load data from file into table Posted in Database, MySQL

How to disable IPV6 on RedHat 6.x

1. Add the following lines in the files listed below:

/etc/modprobe.d/modprobe.conf

options ipv6 disable=1
alias net-pf-10 off
alias ipv6 off
install ipv6 /bin/true

(for Redhat 5.x, file location is /etc/modprobe.conf)

/etc/sysconfig/network

NETWORKING_IPV6=no
IPV6INIT=no

/etc/sysconfig/network-scripts/ifcfg-ethx (x=0, 1, 2 …)

IPV6INIT=no

2. Disable ip6tables service

chkconfig ip6tables off

3. Reboot your system

init 6

or

reboot

or

shutdown -r now

4. Once your system if fully started:

rmmod ipv6

5. Make sure ipv6 module is not loaded

lsmod | grep ipv6

Comments Off on How to disable IPV6 on RedHat 6.x Posted in Linux, RedHat