How to scan the new lun in AIX and RHEL?

How to scan the new LUN in AIX and RHEL?

For AIX:
Make sure you are taking the below output before scan for new lun/disk.
#lspv
#lspv|wc -l

Now execute the below commands to scan the new lun/disk.
#cfgmgr

check the new lun/disk added to the box with the help of new outputs of the following compared with the old output.

#lspv
#lspv|wc -l


For RHEL Linux:


Make sure you are taking the following output before scan for new lun. (Knowing the newly added Lun size before we scan would be better)

fdisk -l
cat /proc/scsi/scsi
cat /proc/scsi/scsi|grep -i host|wc -l
multipath -l
tail -50 /var/log/messages

Now execute the below commands to scan the new lun.

syntax:      echo "- - -" > /sys/class/scsi_host/host(n)/scan  

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

(Make sure the space is there between the hyphen in the echo command [echo "- - -" ]  and you should do this for all HBAs.

check the new lun added to the box with the help of new outputs of the following compared with the old output.

fdisk -l
cat /proc/scsi/scsi
cat /proc/scsi/scsi|grep -i host|wc -l
multipath -l
tail -50 /var/log/messages

-----------------------------------------------------------------------------------------------------

Note: (optional)
Please use the following steps if we don't know the hba card details.

ls /sys/class/fc_host
cd /opt/hp/hp_fibreutils
./adapter_info

The output is just like the below.  (Note the link status is "UP", it will help you to execute the echo command and fill up the host(n) field.)

sys/class/scsi_host/0: STATE=LINK UP WWNN=20000000c98566b4 WWPN=10000000c98566b4
/sys/class/scsi_host/1: STATE=LINK DOWN WWNN=20000000c98566b5 WWPN=10000000c98566b5
/sys/class/scsi_host/2: STATE=LINK UP WWNN=20000000c98566bc WWPN=10000000c98566bc
/sys/class/scsi_host/3: STATE=LINK DOWN WWNN=20000000c98566bd WWPN=10000000c98566bd

From the above output host0 and host2 are in UP status. So we scan the system for hdisk0 and hdisk2 like below.

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

Comments

Popular posts from this blog

How to Install and Configure Kubernetes Cluster and Docker on CentOS8/RHEL8

How to install Ansible Tower on Red Hat / CentOS

How to install Ansible on RHEL8 / CentOS8