Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Friday 1 November 2013

Managing HBAs and SAN disks in Redhat Linux 4 & 5


Redhat 5 :

To list the LUNs and their paths :
# multipath -ll

To display pv information on a multipath :
# pvdisplay /dev/mapper/mpath0

To find the server hardware details :
# dmidecode <- -l="" 2="" class="" fc_host="" fdisk="" for="" hardware="" host0="" host1="" info="" ls="" luns:="" new="" scan="" sys="" to="">/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l

# echo "1" > /sys/class/fc_host/host0/issue_lip

# echo "- - -" > /sys/class/scsi_host/host0/scan

# echo "1" > /sys/class/fc_host/host1/issue_lip

# echo "- - -" > /sys/class/scsi_host/host1/scan

# cat /proc/scsi/scsi | egrep -i 'Host:' | wc -l

# fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l



RHEL 4.6 :

To see HBA details like firmware, wwn,etc.. :
# cat /proc/scsi/qla2xxx/0

To list the HBAs along with their HBA :
# adapter_info

To scan for new LUNs:
# hp_rescan -a

To show the WWN of a LUN :
# scsi_info /dev/sdb


To list the configured Qlogic adapters:
# lspci | grep -i qlo


To list the LUNs:
# /opt/hp/hp_fibreutils/lssd

Output will be like

sda H,B,T,L 

where
H is the host number of the HBA
B is the bus number (normally 0)
T is the target number
L is the LUN number
is a string which uniquely identifies the storage array.

To remove a lun from OS:
# echo "1" > /sys/block/sd/device/delete
# echo "scsi remove-single-device H B T L" > /proc/scsi/scsi
# echo "1" > /sys/class/scsi_host/host/device/targetH:B:T:L/H:B:T:L/delete

No comments:

Post a Comment