rageek

A place for Unix Thoughts and Ideas

Quickly add Luns to a Solaris host

Here is a 1 liner for having Solaris rescan all of its fibre cards for new luns and then have them detected by Veritas.

This only works if you are using the built in Leadville drivers (which you probably should be running anyway).

If you are not familiar with vxdiskconfig, it simply runs devfsadm, followed by vxdctl enable

cfgadm | grep fc-fabric | awk ‘{print $1}’ | xargs -I {} cfgadm -c configure {};vxdiskconfig;vxdisk list

I you are not using Veritas on your system, you could alternatively do
cfgadm | grep fc-fabric | awk ‘{print $1}’ | xargs -I {} cfgadm -c configure {}; devfsadm -v

BTW, if you are still using the lpfc drivers, I would strongly recommend moving to the Leadville drivers as they work more consistently for dynamic LUN addition.
I had been very hesitant of using the Leadville drivers, remembering back to when I used to work at HDS and they internally referred to it as the LeadWeight driver.

However, after experiencing multiple production outages when the lpfc driver would not properly detecting SAN path failure (such as a port failure or a target disappearing and then reappearing). We made the change and I have been much happier and our systems have been very reliable when dealing with transient SAN events ever since. Our performance has also been extremely good.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: