Solaris: Adding a New LUN to the System


    Server with Solaris 10 on board and HBA Qlogic. The storage is connected to it via FC and 2 new LUs are presented.


    Rescan the LUN, preferably without shutting down the HBA and rebooting the server, so as not to interrupt the application.

    How to do it?
    There are several solutions, depending on the situation and the environment. I will describe those that I know of. Not all of them are guaranteed to work in your environment, but the chance that at least one will achieve the desired result is quite high. I tested the solutions on Solaris 10, but some will work on Solaris 7-9, with some corrections.

    If you are interested in the solutions I have found - I ask for a cat.


    If you have Solaris 8, 9, or 10 and Qlogic HBA, like mine, then it’s usually enough to run the following command
    cfgadm –al

    cfgadm allows you to manage dynamically changing server hardware resources.
    the –l switch displays the status of devices.
    the key - a indicates that –l also lists dynamic resources.

    That's it, the drives have already appeared:


    It makes sense to start this step if the first one did not produce results. Enter in the console:
    luxadm probe –p

    luxadm is responsible for managing FC AL devices and executing various control and polling commands for the equipment
    . The probe subcommand searches and displays all FC devices.
    The –p switch, in addition to probe, displays physical paths for found devices. Useful for diagnosing SAN zoning and verifying path availability.


    If the previous solutions did not help, then continue:
    devfsadm -c disk

    devfsadm contains the / dev namespace and replaces the legacy set of devfs applications, including drvconfig, disks, tapes, ports, and a couple more.
    The –c switch restricts the types of devices that need to be polled and requires you to explicitly tell it what to scan. In my case, it is type disk.
    After this operation, disks usually appear as well.


    I described the cfgadm command a little higher. I made this a separate decision because it will take a little more action to add a device and a few more options.
    1. cfgadm -c configure cX
    2. cfgadm -c configure cX :: 216000c0ff804351
    3. cfgadm -o force_update -c configure cX

    The key - c is responsible for the functions of changing the state of devices on channels.
    The configure parameter configures the hardware so that it can be used on Solaris.
    The –o switch allows you to pass certain options to the hardware component, in our case, it is force_update, which performs a forced update.

    Now about the options in more detail:
    In the first option, instead of cX”, you need to specify the channel number on which the desired device is located, for this we return to the picture from the first method: Suppose this is channel 2, then the command will look like this:

    cfgadm -c configure c2

    In option 2 we specify which device needs to be configured:
    cfgadm -c configure c2 :: 216000c0ff804351

    In the third option, we tell the system to force update the device configuration:
    cfgadm -o force_update -c configure c2
    or even so
    cfgadm -o force_update -c c2 :: 216000c0ff804351

    After all these manipulations, you will definitely need to run the command:
    devfsadm -c disk


    To reload the HBA driver, this method may already be associated with a little downtime.
    In the case of Qlogic, a driver reboot is called with the following command:
    update_drv qlc
    update_drv -f qlc

    update_drv is just responsible for rescanning driver settings.
    The - f option forces the driver configuration to be reread, even if the module cannot be unloaded from the kernel. (At the same time, the driver module itself is not unloaded from the kernel)


    No matter how trite it may sound - restart the server.
    To tell Solaris to scan all devices at boot, you can use the following methods:
    A) On a loaded OS
    touch / reconfigure
    init 6

    B) From the OpenBoot server bootloader, specify the command:
    boot -r

    Perhaps those who work with the Solaris OS will find these answers quite simple or explicit. But my acquaintance with Solaris is quite limited, so these tips may well come in handy for other people starting to work with Solaris servers.

    Also popular now: