Gopi Desaboyina Solaris Blogs

Just another WordPress.com weblog

Discovering new SAN LUNS in Solaris

In this blog, i’m going talk about discovering new SAN volumes in Solaris 9 & 10. Normally as soon as SAN LUNS are mapped to your server. first thing you would do is, try to detect them by using format command. if you can’t still see them,here are steps normally I follow.

Solaris 9:
Make sure the news luns are masked from same fiber channel zone as earlier. if not you might want to get the correct fcp-bind wwn address and hardcode it in /kernel/drv/lpfc.conf with your own free target number below. Below t0/t1 are for target and you can pick any free number.

fcp-bind syntax below.
fcp-bind-WWPN=”4100123456789abc:lpfc0t0″,
“41000020370c2855:lpfc0t1”;

once lpfc.conf is edited, we need to edit /kernel/drv/sd.conf with info of how many devices(luns) can be accessible through above target. with one port we can see 255 devices(luns). so you write file like below.

name=”sd” parent=”lpfc” target=0 lun=1 hba=”lpfc0″;
name=”sd” parent=”lpfc” target=0 lun=2 hba=”lpfc0″;
.
.
.
name=”sd” parent=”lpfc” target=0 lun=255 hba=”lpfc0″;
name=”sd” parent=”lpfc” target=1 lun=1 hba=”lpfc1″;
name=”sd” parent=”lpfc” target=1 lun=2 hba=”lpfc1″;
.
.
.
name=”sd” parent=”lpfc” target=1 lun=255 hba=”lpfc1″;

once that is done.you need to reconfigure reboot using reboot — -r. after rebooting you should see new LUNS.

Now if new LUNS were already masked from same old fcp-wwn, you just need to run devfsadm -C to detect them. sometime even using devfsadm doesn’t detect then you need to look cfgadm -al o/p and force configure if any of fc is in unconfigured state.
cfgadm -al
cfgadm -f -c configure c2:unconfigured_number

If it’s Solaris 10 :

Beauty of Solaris 10 is you don’t need do any of the above stuff. It has nice feature of discovering luns automatically. just run devfsadm,devfsadm -C,cfgadm -al should bring up and show the new LUNS.

If devfsadm don’t bring up the new LUNS. you might want to try
cfgadm -f -c configure # Make sure you don’t unconfigure by mistake, if you do you may loose the SAN connection and volumes will go offline if you don’t have multipathing.

cfgadm has some options to show all luns. you can use below commands what are the luns visible through to fiber channels.
cfgadm -al -o show_FCP_dev
cfgadm -al -o show_SCSI_LUN

Advertisements

April 1, 2009 - Posted by | Solaris |

6 Comments »

  1. […] The busiest day of the year was August 25th with 68 views. The most popular post that day was Discovering new SAN LUNS in Solaris . […]

    Pingback by My Blog gdesaboyina.wordpress.com 2010 in review « Gopi Desaboyina Solaris Blogs | January 2, 2011 | Reply

  2. sir i need how to take lun from san & how to take lun into the os control pls define the procedure.with command wise.my tutor is hide this topic.pls explain in command wise.

    Comment by vijay chand | September 25, 2011 | Reply

    • Hello Vijay, as my blog said. All you need to do is devfsadm if it’s Solaris 10 that should bring the LUNs up and you should see them in format output. once format is able to see them you can label and go for filesystem creation.

      Comment by Gopi | October 3, 2011 | Reply

  3. sir, how to remove lun from san & return to the san people pls explain in commandwise.

    Comment by vijay chand | September 25, 2011 | Reply

    • Hello Vijay,
      Depends on volume manager you are using you need to remove them from Volume Manager Control.

      For SVM : you can do metaclear
      metadb -d # Do this only if your SAN lun is part of SVM DB
      For vxvm : vxdisk rm # you need to make sure all volumes are unmounted & stopped and then do this step.

      Once it’s removed from volume manager control. You can ask SAN people to claim the LUN. Once they claim, You can run devfsadm -Cv to clean up device tree. Confirm their disappearance through format command.

      It’s not very simple to give the commands. I would recommend you to go through the Particular Volume Manager admin guides. Good Luck

      Comment by Gopi | October 3, 2011 | Reply

  4. Hi Gopi

    I am migrating a few solaris 10 servers from USP-V to VSP storage box. I am using the virtualization + migration technique using Hitachi’s UVM and TSM.
    My question is when I shut down server, pull it out from USP-V and zone it to VSP, then virtualize USP-Vs LUNS in VSP and assign them to server, and when I reboot them, would the server continue normal operation or would they freak-out?? I will make sure that LDEV and LUN numbers are same. Is there anything else I need to take care of? . Even after reboot if volumes are shown offline on solaris, what can I do to restore them.

    Thanks

    Comment by Shash | October 23, 2011 | Reply


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: