RHEL: Scan and configure new SAN (fibre channel) LUNs

# Tested on RHEL 5 & 6

# Identify host adapters on the system

systool -c fc_host

   Class = "fc_host"

     Class Device = "host3"
       Device = "host3"

     Class Device = "host4"
       Device = "host4"


ls /sys/class/fc_host
   host3  host4



# Rescan the hbas
# ------------------------------------------------------------------------------------------

echo "- - -" > /sys/class/scsi_host/host3/scan
echo "- - -" > /sys/class/scsi_host/host4/scan

# If this commands don't get to make new LUNs visible to system, you can try a "issue_lip"
# rescan.

# Take into account that rescanning via "issue_lip" will reset the HBAs what may cause
# a data loss if I/O operations are going on.
Use this type of scan only when necessary.
# In addition, as per Red Hat recommendations, the following restrictions must be observed
# when scanning storage interconnects:
#
# All I/O on the effected interconnects must be paused and flushed before executing the
# procedure, and the results of the scan checked before I/O is resumed.
#
# As with removing a device, interconnect scanning is not recommended when the system is
# under memory pressure. To determine the level of memory pressure, run the command
# "vmstat 1 100"; interconnect scanning is not recommended if free memory is less than 5%
# of the total memory in more than 10 samples per 100. It is also not recommended if
# swapping is active (non-zero 'si' and 'so' columns in the "vmstat" output). The command
# "free" can also display the total memory.

# I recommend to use "issue_lip" rescan only in case of servers that are discovering fibre
# SAN disk for first time:

# echo "1" > /sys/class/fc_host/host3/issue_lip
# echo "1" > /sys/class/fc_host/host4/issue_lip
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Set Up SSH Tunneling on a Linux / Unix / BSD Server To Bypass NAT
Viewed 12263 times since Fri, May 15, 2020
Use inotify-tools on CentOS 7 or RHEL 7 to watch files and directories for events
Viewed 15457 times since Fri, Jul 27, 2018
What Is /dev/shm And Its Practical Usage
Viewed 9405 times since Tue, Mar 12, 2019
Tunnel SSH Connections Over SSL Using ‘Stunnel’ On Debian 7 / Ubuntu 13.10
Viewed 4739 times since Fri, Sep 28, 2018
How to automate SSH login with password? ssh autologin
Viewed 3714 times since Fri, Jun 8, 2018
stunnel How To Set Up an SSL Tunnel Using Stunnel on Ubuntu
Viewed 2809 times since Sun, Dec 6, 2020
Linux: how to monitor the nofile limit
Viewed 11961 times since Wed, Jul 25, 2018
RHEL: Extending the maximum inode count on a ext2/ext3/ext4 filesystem
Viewed 4617 times since Sun, May 27, 2018
Linux Network (TCP) Performance Tuning with Sysctl
Viewed 13497 times since Fri, Aug 3, 2018
RHEL: XFS basic operations
Viewed 18107 times since Sat, Jun 2, 2018