Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyone has cccess to Legato Web Support

Status
Not open for further replies.

jjrinconbayon

Technical User
May 14, 2002
31
ES
if anyone has access to legato web support i would be very pleased if may send me the following article
"understanding and configuring lus.conf."

Thanks a lot,
Juanjo
 
I hope this is what you are looking for.

Cheers!
Maverick

Solution Title: Understanding and editing the lus.conf on Solaris
Solution ID: legato23512

Here is the solution:

Legato NetWorker uses the "lus" driver (/usr/kernel/drv/lus) to control the robotic arm of a tape library. The /usr/kernel/drv/lus.conf file is what controls the "lus" driver during startup. Most of the time, you do not need to edit this lus.conf configuration file. However, as people move to SAN environment using fiber channel HBA cards, the lus.conf may need to be edited in order for "lus"
to be able to detect the devices connected in the SAN.

Below is an illustration of how "lus" functions in a Solaris environment
(1) During bootup, "lus" is loaded and issues a probe scsi API call to tell SOLARIS to return all SCSI adapters by probing target 0. Why only target 0? This is because Networker does not know what SCSI adapters would be detected yet, hence we assume every adapter will have a device attached to target 0, once we found the adapter, we can search through as many targets and luns as we want for that adapter. Ever wonder what the last line in the lus.conf means? Well, in the default lus.conf, it tells SOLARIS to return all SCSI adapters with target 0. If you have a SCSI adapter that does not have a device hooked up to target 0, you will discover the adapter might not get detected by "lus". Hence, you need to force "lus" to also search for a detectable target (i.e. any target that the probe scsi API call can probe and detect), for example, if I want to tell "lus" to bootup searching for all SCSI adapters through target 0 and target 120, then you would put at the end of the lus.conf the following two lines:

name="lus" class="scsi" target=0 lun=0;
name="lus" class="scsi" target=120 lun=0;

If you have an unsupported HBA card and it is not detected by "lus", below is what you can do to get "lus" to see the HBA card.

A. Use Legato provided lus_add_fp_devs script. Just execute the script and it
should automatically update the lus.conf with the adapter configuration info.


B. The second method is explicitly adding the HBA entry to "known-scsi-adapter"
listing in lus.conf. Here is the procedure:

Run "/etc/LGTOuscsi/lusbinfo", which will return something like the following

# /etc/LGTOuscsi/lusbinfo
# busses: 4
Bus #0 is 'glm0', dma_max=16777215, initiator ID=7, ntargets=16, nluns=7
Bus #1 is 'glm1', dma_max=16777215, initiator ID=7, ntargets=16, nluns=7
Bus #2 is 'pci10df,f8000', dma_max=-1, initiator ID=255, ntargets=16, nluns=7
Bus #3 is 'pci10df,f9001', dma_max=-1, initiator ID=255, ntargets=16, nluns=7

In the above example, both an Emulex LP8000 and LP9000 are used. Devices with target IDs ranging from 1 through 127, and luns from 0 to 31. So what you will do is take the description in between the single quotes, in this case:

pci10df,f8000
pci10df,f9001

remove the last digit

pci10df,f800
pci10df,f900

add in the max target

pci10df,f800:126
pci10df,f900:126

add in the max luns

pci10df,f800:126-32
pci10df,f900:126-32

then, enable HBA transport cloning, which is a feature of HBA cards that does some sort of clever mapping between fibrechannel LUNs and SCSI IDs

pci10df,f800:126-32C
pci10df,f900:126-32C

lastly, add these two entries to the end of "known-scsi-adapters=" in /usr/kernel/drv/lus.conf, delimited by a space.

#### VERY IMPORTANT ####: ensure you do not have any typo for that "known-scsi-adapters=" line, which can be very long. If you accidentally add a space in between a setting, for example "pci10df,f900:126-32C" becomes "pci10df, f900:126-32C" then, anything including after pci10df, f900:126-32C" will assume a default max target of 16 (if it ever get detected) and max luns of 7, like in the above "lusbinfo" output example. An example of a completed lus.conf is as follows.

################################
#SAMPLE /usr/kernel/drv/lus.conf
################################
#
# $Id: lus.conf.src,v 1.9.28.3 2001/06/04 17:15:29 chejlava Exp $ Copyright (c) 1995, 1998, 1999, Legato Systems, Inc.
# Copyright (c) 1995, 1998, 1999, Legato Systems, Inc.

# Configuration for number of targets on scsi busses: new with v 6.12 of lus.
# There are 3 methods lus uses to determine how many target IDs to allow for a
# given SCSI bus.
#
# First, the list below in the property called known-scsi-adapters is searched
# for a match with the SCSI adapter's device name. If an exact match is found,
# the number after the : is used as the number of targets. Each entry is
# separated by at least one space. The number after the - is the maximum LUN
# that will be searched. If there is a character 'C' as the last character
# before the next space, then lus will do what is called HBA transport cloning.
# If you don't know a driver requires this. do not set it as we suspect that
# some normal SCSI HBA drivers can cause system panics if we do this.
# The usual driver that needs cloning is a Fibrechannel driver that does some
# sort of clever mapping between Fibrechannel LUNs and SCSI IDs
#
# If there is no match in known-scsi-adapters, another property called
# bus<n>-targets is searched for. If a match is found for the current bus
# number, the value after the = is used for the number of targets on that
# bus. (e.g., for bus 1, if bus1-targets=16; is found, then 16 will be used
# for bus 1) To use this method, simply insert this type of string in this
# file below where indicated for global properties. Usual values for
# bus<n>targets will be 8 for narrow SCSI, 16 for wide SCSI or 126 for
# FiberChannel adapters with SCSI-like drivers
#
# If none of the above set a value, lus looks for a property called "wide-xfer".
# If this is found on a given adapter, then 16 targets is assumed, otherwise 8
# is used.
#
# There will be one line displayed on the system console when lus loads for each
# bus found, stating the number of targets being used and the method used to
# determine the value.
#
# Warning: Setting these values too high can have dire consequences for your
# data. Experimentation is at the experimenter's own risk.
#
# Global properties recognized include:
# known-scsi-adapters="adapter_name:target_count-maxlun[C] adapter_name:target_count-maxlun[C] ...";
# bus<n>-targets=X;
# bus<n>-maxlun=X;
#
#

# Insert global properties here, (one per line, ending with a semicolon)
# before the 'name="lus"' line.

# esp = Sun SE scsi I/F
# isp = SUN Differential or fast/wide SCSI
# fas = Sun fast wide SCSI
# glm = Sun SCSI in Ultras
# pci1000,f = alternate driver for glm PCI adapters
# ifp = (don't recall - is some FC adapter)
# pci1077,2100 = Qlogic 2100 PCI Fibrechannel
# pci1077,1 = Qlogic 2100 - different rev driver
# pci1077,2200 = Qlogic 2200, rev 1.09 driver
# pci9004,8478 = Adaptec 2944 UW/OF differential scsi
# pci10df,f700 = Emulex LP7000 Fibrechannel (needs clone)
# pci10df,f800 = Emulex LP8000 Fibrechannel (needs clone)
# pci10df,f900 = Emulex LP9000 Fibrechannel (needs clone)
# fca = JNI 32bit Fibrechannel (needs clone)
# fcaw = JNI 64bit Fibrechannel (needs clone)
# pci1242,4643 = JNI PCI 64-bit Fibrechannel (needs clone)
# JNI,FCE = JNI PCI 64-bit Fibrechannel (needs clone)
# fp = Sun's new "leadville" FC driver stack on Solaris 8 only
# pci1077,2 = Qlogic 2200, rev 3.07 driver

known-scsi-adapters="esp:8-7 SUNW,esp:8-7 isp:16-7 SUNW,isp:16-7 QLGC,isp:16-7 fas:16-7 SUNW,fas:16-7 glm:16-7 SUNW,glm:16-7 pci1000,f:16-7 ifp:126-126 SUNW,ifp:126-126 PTIX,isptwo:126-126 pci1077,2100:126-126 pci1077,1:126-126 pci9004,8478:16-7 pci10df,f700:126-32C pci10df,f800:126-32C pci10df,f800:126-32C fca:126-32C fcaw:126-32C pci1242,4643:126-32C pci1077,2200:126-32 JNI,FCE:126-32C fp:126-32 pci1077,2:126-32 ";

name="lus" class="scsi" target=0 lun=0;

After you're done editing the lus.conf, no need to restart Solaris if you're using Solaris 6 and above (Solaris 5 and below requires a reboot)
(1) Search for the "lus" driver using "modinfo | grep lus"
(2) Unload the "lus" driver using "modunload -i [module-id]"
(3) Re-load the "lus" driver using "modload /usr/kernel/drv/lus"

C. In addition to specifying the HBA entry in "known-scsi-adapters" listed as
illustrated above we can also explicitly specify the target-id and LUN we want
LUS to probe for that adapter. In a SAN using Sun's leadville drive this is done
by explicitly specifying the targetid + Lun with the WWN for that adapter.
To manually add the entries you will have to find a mapping between the fibre
HBA WWN and the corresponding target id's and LUN's we want configured. Assuming that we know the fibre channel port for the HBA the connected devices will
be seen by we next need to find the WWN for tape and jukebox devices that LUS needs to know about. To get this run:

luxadm -e dump_map {device_path}

where device_path is got by running :

luxadm -e fc_port_for_hba

luxadm is a Sun provided utility and see the man page for details.

Please note that the lus.conf here does not have a detailed listing for all the targetid/LUN's we want configured and is provided for illustration purposes only. You will of course have to unlood lus before changing lus.conf and run inquire
or any other utility after changes for it to get reloaded after parsing the
updated file entries.


#
# $Id: lus.conf.src,v 1.9.28.3 2001/06/04 17:15:29 chejlava Exp $ Copyright (c) 1995, 1998, 1999, Legato Systems, Inc. # Copyright (c) 1995, 1998, 1999, Legato Systems, Inc.

# Configuration for number of targets on scsi busses: new with v 6.12 of lus. # There are 3 methods lus uses to determine how many target IDs to allow for a # given SCSI bus. #
# First, the list below in the property called known-scsi-adapters is searched # for a match with the SCSI adapter's device name. If an exact match is found, # the number after the : is used as the number of targets. Each entry is
# separated by at least one space. The number after the - is the maximum LUN
# that will be searched. If there is a character 'C' as the last character
# before the next space, then lus will do what is called HBA transport cloning. # If you don't know a driver requires this. do not set it as we suspect that # some normal SCSI HBA drivers can cause system panics if we do this. # The usual driver that needs cloning is a Fibrechannel driver that does some # sort of clever mapping between Fibrechannel LUNs and SCSI IDs # # If there is no match in known-scsi-adapters, another property called
# bus<n>-targets is searched for. If a match is found for the current bus
# number, the value after the = is used for the number of targets on that
# bus. (e.g., for bus 1, if bus1-targets=16; is found, then 16 will be used
# for bus 1) To use this method, simply insert this type of string in this
# file below where indicated for global properties. Usual values for
# bus<n>targets will be 8 for narrow SCSI, 16 for wide SCSI or 126 for
# FiberChannel adapters with SCSI-like drivers
#
# If none of the above set a value, lus looks for a property called "wide-xfer". # If this is found on a given adapter, then 16 targets is assumed, otherwise 8 # is used. # # There will be one line displayed on the system console when lus loads for each # bus found, stating the number of targets being used and the method used to # determine the value. # # Warning: Setting these values too high can have dire consequences for your
# data. Experimentation is at the experimenter's own risk.
#
# Global properties recognized include:
# known-scsi-adapters="adapter_name:target_count-maxlun[C] adapter_name:target_count-maxlun[C] ...";
# bus<n>-targets=X;
# bus<n>-maxlun=X;
#
#

# Insert global properties here, (one per line, ending with a semicolon)
# before the 'name="lus"' line.

# esp = Sun SE scsi I/F
# isp = SUN Differential or fast/wide SCSI
# fas = Sun fast wide SCSI
# glm = Sun SCSI in Ultras
# pci1000,f = alternate driver for glm PCI adapters
# ifp = (don't recall - is some FC adapter)
# pci1077,2100 = Qlogic 2100 PCI Fibrechannel
# pci1077,1 = Qlogic 2100 - different rev driver
# pci1077,2200 = Qlogic 2200, rev 1.09 driver
# pci9004,8478 = Adaptec 2944 UW/OF differential scsi
# pci10df,f700 = Emulex LP7000 Fibrechannel (needs clone)
# pci10df,f800 = Emulex LP8000 Fibrechannel (needs clone)
# fca = JNI 32bit Fibrechannel (needs clone)
# fcaw = JNI 64bit Fibrechannel (needs clone)
# pci1242,4643 = JNI PCI 64-bit Fibrechannel (needs clone)
# JNI,FCE = JNI PCI 64-bit Fibrechannel (needs clone)
# fp = Sun's new "leadville" FC driver stack on Solaris 8 only # pci1077,2 = Qlogic 2200, rev 3.07 driver

known-scsi-adapters="esp:8-7 SUNW,esp:8-7 isp:16-7 SUNW,isp:16-7 QLGC,isp:16-7 fas:16-7 SUNW,fas:16-7 glm:16-7 SUNW,glm:16-7 pci1000,f:16-7 ifp:126-126 SUNW,ifp:126-126 PTIX,isptwo:126-126 pci1077,2100:126-126 pci1077,1:126-126 pci9004,8478:16-7 pci10df,f700:126-32C pci10df,f800:126-32C fca:126-32C fcaw:126-32C pci1242,4643:126-32C pci1077,2200:126-32 JNI,FCE:126-32C fp:126-32 pci1077,2:126-32 ";

name="lus" class="scsi" target=0 lun=0;
name="lus" parent="fp" target=0 lun=0 fc-port-wwn="100000e00222012e"; name="lus" parent="fp" target=0 lun=1 fc-port-wwn="100000e00222012e"; name="lus" parent="fp" target=1 lun=0 fc-port-wwn="100000e0022200ff"; name="lus" parent="fp" target=1 lun=0 fc-port-wwn="100000e0022200ff";
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top