Monday, July 20, 2015

what i learned #today 20-07-2015

Hi all ,

one of my friend asked me how to scan newly  attached LUN's

How to scan new FC LUNS and SCSI disks in Linux ?

How to scan new FC LUNS and  SCSI disks in Redhat Linux without rebooting the server?  Most of the Linux beginners have wondering how to do this and this article will be for them.It may look like very simple as we perform this in daily operation to scan luns but system has many work to do in background when you execute storage scanning commands. Redhat says this type of scan can be distributive,since it can cause delays while I/O operation timeout and remove devices unexpectedly from OS.So perform this scan when really you want to scan the disks and LUNS.

Scanning FC-LUN’s in Redhat Linux
1.First find out how many disks are visible in “fdisk -l” .
# fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l 
2.Find out how many host bus adapter configured in the Linux box.you can use “systool -fc_host -v” to verify available FC in the system.
# ls /sys/class/fc_host
host0  host1  
In this case,you need to scan host0 & host1 HBA.

3.If the system virtual memory is too low ,then do not proceed further.If you have enough free virtual memory,then you can proceed with below command to scan new LUNS.
# echo "1" > /sys/class/fc_host/host0/issue_lip
# echo "1" > /sys/class/fc_host/host1/issue_lip
Note: You need to monitor the “issue_lip” in /var/log/messages to determine when the scan will complete.This operation is an asynchronous operation.

4.Verify if the new LUN is visible or not by counting the available disks.
# fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l 
If any new LUNS added ,then you can see more count is more then before scanning the LUNS.

Scanning SCSI DISKS in Redhat Linux
1.Finding the existing disk from fdisk.
[root@mylinz1 ~]# fdisk -l |egrep '^Disk' |egrep -v 'dm-'
Disk /dev/sda: 21.5 GB, 21474836480 bytes
2.Find out how many SCSI controller configured.
[root@mylinz1 ~]# ls /sys/class/scsi_host/host
host0 host1 host2
In this case,you need to scan host0,host1 & host2.

3.Scan the SCSI disks using below command.
[root@mylinz1 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan
[root@mylinz1 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan
[root@mylinz1 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan
4.Verify if the new disks are visible or not.
[root@mylinz1 ~]# fdisk -l |egrep '^Disk' |egrep -v 'dm-'
Disk /dev/sda: 21.5 GB, 21474836480 bytes
Disk /dev/sdb: 1073 MB, 1073741824 bytes
Disk /dev/sdc: 1073 MB, 1073741824 bytes


From Redhat Linux 5.4 onwards, redhat introduced “/usr/bin/rescan-scsi-bus.sh” script to scan all the SCSI bus and update the SCSI layer to reflect new devices. 

But most of the time,script will not be able to scan new disks and you need go with echo command.

please look into this link 

Thank you for reading this article.

Thursday, July 16, 2015

What i learned today 15-07-2015

Today we have some problem faced in our environment, that we have to check whether the LDAP port is opened or closed . usually  we go with telnet command that will show us which port is opened.

But  some times we should to check more than that , so we should use tcpdump to check on all the details as required.

following is the command used to solve 

tcpdump -i ethernetnumber port 909

 eg :- tcpdump -i eth0 port 909

Above example gives you whats going  on in particular port 909.

Friday, July 10, 2015

What i learned today 9-7-15

Hi all

Bellow are the things learned today.

1.

I understand why we use blacklist=e1000e command in kernel arguments while installing OS in physical servers, i do this previously in server os installations but i forget it some how.

guys please make an note of this, because it is really helpfull for you while installing OS. problem is anaconda installer  is unable to find which network card to be used to search for rpms to proceed with OS installation.

2.

for the first time in my life i used for loop in my work environment , wow it works amazing(i know) , But when you feel an relaxation while it creates output as you desired.
     I look for ways to bringing up all the network cards in my network , usualy what we do means that we go and enter all the cards one by one , we know there is an option for it to reduce the process but we are not ready to find out how to solve it , i just googled it and find out these.

     for i in {0..15};do ifconfig eth"$i" up ; done

This looks like simple to you, but it bring up all the network cards in my Server, Pretty weird right. ya i too accept that fact

Task --> you need to create redis dbs, either single or multiple based on hiera data using puppet

Hi all, I know there is no post in past few weeks, sorry i was struck with my family issues and i got married recently . so come to our i...