[13746418] SAN Dynamic Reconfiguration

[All Linux Operating Systems] Linux does not automatically update storage LUNs after a dynamic reconfiguration. Dynamic reconfiguration is the addition, deletion, growing, resizing, or cloning of one or more LUNs attached to a host.

Linux requires a series of steps, including a potential host reboot, when a LUN is dynamically reconfigured. The details vary between Linux distributions and releases. You should review the discussion of dynamic SAN reconfiguration in the storage or SAN administration guide for the release you are using. The following steps provide general guidance which can be helpful.

Note: These guidelines apply to both Pillar Axiom Systems and Oracle Flash Storage Systems.

LUNs Added Dynamically

In most systems, a newly added LUN is immediately visible on the host without a rescan. However, due to inconsistent device driver behavior on some hosts, if the added LUN is not visible, a rescan usually makes it visible. A rescan usually involves an I/O reset.

Create a new LUN on the Oracle FS System and assign it to the host. Run the rescan script and if running the rescan script does not bring up the LUNs, you may need to assign a new LUN number. Assign a new LUN number that the Linux operating system does not consider already in use. To correct this situation, modify the host LUN number in the Oracle FS System Manager (GUI). Assign a new, unique value that falls within the range of permitted values. If necessary, rescan to add the LUN.

Both Emulex and QLogic provide rescan scripts that may help in dynamically configuring LUNs. See your adapter vendor's website for information on any tools they provide for scanning the SAN.

LUNs Deleted Dynamically

Deleting a LUN prevents the LUN from being visible from the host. This includes deleting LUN mapping and LUN masking. In general, LUN deletion disrupts normal function of the Linux multipath framework and must be planned.

If a LUN is deleted, it may appear as either a 2000000000000 entry or as the original LUID with Path down messages. These entries may persist until the host is rebooted.

To avoid disruption, you may blacklist the LUN. Refer to your Linux documentation for information on blacklisting a LUN.

The host usually picks up the deleted LUN, and it is deleted from the /dev/mapper table. However, this may not occur on all platforms consistently. If you want to view the device-mapper LUN mapping table, start the multipathd shell by running the following command:
# /sbin/multipathd -k
To delete a LUN, we recommend shutting down the host, deleting the LUN or LUN mapping from the Oracle FS System system, and then restarting the host. If this procedure is not possible, you may want to run the following procedure.
Important! The following procedure will interrupt I/O and may require an immediate reboot of your host. In some cases, this may require a power cycle of the host to recover.
  1. Copy the following and run it as a script:
    #!/bin/bash
    # Must be run as root
    /etc/init.d/fspmd stop
    /sbin/multipath -F
    /sbin/service/multipathd stop
    # RESCAN SCRIPT FROM QLOGIC / EMULEX
    # Please modify the following line based on your rescan script location
    /usr/bin/ql-dynamic-tgt-lun-disc.sh -s -r 
    /sbin/service/multipathd start
    /etc/init.d/fspmd start
    /sbin/multipath –v3 -ll
    
    Tip: The rescan script might require your interaction.
  2. Be prepared to reboot the host as soon as possible after deleting LUNs in case something goes wrong.

If a LUN that is visible to a Linux 2.6 (kernel or higher) host is deleted from the Oracle FS System, and the /sbin/multipath -F or /sbin/multipath -f command is run before rebooting the host, the device-mapper configuration map may become unusable and all access to LUNs may be lost due to a bug in the Linux device-mapper code. If this occurs, the only way to recover is to reboot the host. Rebooting the host will flush any deleted path entries from the device table.

LUNs Resized Dynamically

When you resize a LUN, a host reboot is often necessary due to the constraints in the Linux device-mapper.

Note: Linux operating systems may provide the ability to expand a LUN without a host reboot. Review your Linux operating system documentation to determine if you need to reboot the host after expanding a LUN.

Clone LUNs Added or Deleted Dynamically

The procedures for adding or deleting LUNs described above also apply for Clone LUNs.