📜 ⬆️ ⬇️

Solaris: Adding a new LUN to the system

Given:


Solaris 10 server on board and Qlogic HBA. FC has a storage connected to it and 2 new LUs are presented.

Task:


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

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

If you are interested in the solutions I found, I ask for cat.

First:


If you have Solaris 8, 9 or 10 and Hlo Qlogic, like me, then it is usually enough to run the following command
cfgadm –al

cfgadm allows you to manage dynamically-variable server hardware resources.
The –l key allows you to display the status of devices.
key - and indicates that –l also displays a list of dynamic resources.
')
Everything, disks already appeared:
image

The second


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

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

Third


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

devfsadm contains the / dev namespace and replaces the outdated set of applications from the devfs package, including drvconfig, disks, tapes, ports, and a couple more.
The –c switch limits the types of devices that need to be polled and requires you to explicitly tell it what to check. In my case, it's a type of disk.
After this operation, the disks also usually appear.

Fourth


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

The key - c is responsible for changing the status of devices on the channels.
The configure option configures the hardware so that it can be used on the Solaris OS.
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 more options:
In the first option, instead of " cX", you need to specify the channel number on which the device is located, for this we return to the picture from the first method:
image
Suppose this is channel 2, then the command will look like this:
cfgadm -c configure c2

In option 2, we specify which device you need to configure:
cfgadm -c configure c2 :: 216000c0ff804351

In the third option, we tell the system to forcefully 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 need to run the command:
devfsadm -c disk

Fifth


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

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

Sixth


No matter how trite it sounds, restart the server.
To tell Solaris about the need to scan all devices at boot, you can use the following methods:
A) In the 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 obvious. But my acquaintance with Solaris is rather limited, so these tips may well be useful for other people who are starting to work with Solaris servers.

Source: https://habr.com/ru/post/124355/


All Articles