How do I rescan an HP Smart Array for new devices without rebooting?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 5
  • HP Smart Array controller
  • cciss driver module

Issue

How to rescan an HP Smart Array for new devices without rebooting ?

Resolution

Adding new disk or array devices

HP Smart Array controllers use the cciss driver within RHEL5. This driver is a block driver and not a scsi host driver so does not present disk or array devices to the Linux SCSI subsystem. Instead of /dev/sdX disks, cciss creates /dev/cciss/c#d# devices as in:

# ls -l /dev/cciss
total 0
brw-r----- 1 root disk 104,  0 Oct  6 15:23 c0d0
brw-r----- 1 root disk 104, 16 Oct  6 15:23 c0d1
brw-r----- 1 root disk 104, 32 Oct  6 15:23 c0d2
brw-r----- 1 root disk 105,  0 Oct  6 15:23 c1d0

Users need to use the vendor provided management tools to configure and enable new disks or disk arrays. Contact the vendor for additional information.

To see more information about the current Smart Array configuration:

# cat /proc/driver/cciss/cciss0
cciss0: HP Smart Array P410i Controller
Board ID: 0x3245103c
Firmware Version: 5.70
IRQ: 122
Logical drives: 3
Sector size: 8192
Current Q depth: 0
Current # commands on controller: 0
Max Q depth since init: 1
Max # commands on controller since init: 2
Max SG entries since init: 17
Sequential access devices: 0

cciss/c0d0:      480.02GB       RAID 0
cciss/c0d1:      500.07GB       RAID 1(1+0)
cciss/c0d2:     2000.36GB       RAID 0

Adding new tape or media changer devices

For tape devices, media changers and other serial access devices the cciss driver will register those device types with the SCSI subsystem. If new tapes or medium changers are added to a running system, they will not be seen by the system until the cciss controller does a device rescan. This happens automatically on reboot. If a reboot is not possible or desirable, the following commands can be used. First, a rescan is done to inform the cciss driver about the changes to the SCSI bus:

$ echo "rescan" > /proc/driver/cciss/cciss0 

Then, add an individual device with:

$ echo scsi add-single-device 3 2 1 0 > /proc/scsi/scsi 

The above example would add a device on controller 3, bus 2, target 1, lun 0. Change the values according to the position and settings of the device that was added.

It is important to note that this operation will not affect any disks or RAID arrays presented to the system via the cciss driver.

SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.