Drives are not being recognized by the OS - Steps to rebuild the /dev/sg/* and /dev/rmt/* devices on a Solaris Master or Media server

Article:TECH31047  |  Created: 2004-01-10  |  Updated: 2012-03-21  |  Article URL http://www.symantec.com/docs/TECH31047
Article Type
Technical Solution


Environment

Issue



Drives are not being recognized by the OS - Steps to rebuild the /dev/sg/* and /dev/rmt/* devices on a Solaris Master or Media server


Solution



Here are the basic steps to rebuild the /dev/sg/* and /dev/rmt/* devices on a Solaris server.

1.  Create a backup copy of the current st.conf file:
# cp /kernel/drv/st.conf /kernel/drv/st.conf.`date +%m%d%y_%H%M%S`

2.  Move the existing sg.conf to a backup (this must be a move, otherwise a later step will fail):
# mv /kernel/drv/sg.conf /kernel/drv/sg.conf.`date +%m%d%y_%H%M%S`

3.  Create a backup copy of the current devlink.tab file:
# cp /etc/devlink.tab /etc/devlink.tab.`date +%m%d%y_%H%M%S`

4.  Delete SCSI targets/LUNs from the /kernel/drv/st.conf file:
name="st" class="scsi"
       target=0 lun=0;

All of these entries should be removed, otherwise duplicates will be added later.

5.  Delete SCSI targets/LUNs from /etc/devlink.tab.  This is typically the section near the end of the file and the entries are typically of the form:

# begin SCSA Generic devlinks file - creates nodes in /dev/sg
type=ddi_pseudo;name=sg;addr=0,0;       sg/c\N0t0l0
type=ddi_pseudo;name=sg;addr=1,0;       sg/c\N0t1l0
type=ddi_pseudo;name=sg;addr=2,0;       sg/c\N0t2l0
type=ddi_pseudo;name=sg;addr=3,0;       sg/c\N0t3l0
type=ddi_pseudo;name=sg;addr=4,0;       sg/c\N0t4l0
type=ddi_pseudo;name=sg;addr=5,0;       sg/c\N0t5l0
type=ddi_pseudo;name=sg;addr=6,0;       sg/c\N0t6l0
type=ddi_pseudo;name=sg;addr=0,1;       sg/c\N0t0l1
type=ddi_pseudo;name=sg;addr=1,1;       sg/c\N0t1l1
type=ddi_pseudo;name=sg;addr=2,1;       sg/c\N0t2l1
type=ddi_pseudo;name=sg;addr=3,1;       sg/c\N0t3l1
type=ddi_pseudo;name=sg;addr=4,1;       sg/c\N0t4l1
type=ddi_pseudo;name=sg;addr=5,1;       sg/c\N0t5l1
type=ddi_pseudo;name=sg;addr=6,1;       sg/c\N0t6l1
# end SCSA devlinks

Everything in this section should be removed, inclusive of the beginning and ending lines.

6.  Change to the appropriate directory to run commands:
# cd /usr/openv/volmgr/bin/driver

7.  Generate the configuration files (st.conf, sg.conf and sg.links):
../sg.build all -mt <max_target> -ml <max_lun>

Note: You will need to know what the max_target and max_lun values will need to be (this is the maximum SCSI Target and LUN value). For example, to create entries for lun-id 0 through 4, use "-ml4".

8.  Append the generated st.conf entries to the OS configuration file:
# cat st.conf >> /kernel/drv/st.conf

9.  Unload the sg driver:
# rem_drv sg
 
Check that this command has been successful. If the following message is received then Step 10 will not successful
 
"device busy cannot unload module sg will be unloaded upon reboot"
 
running the command
 
rem_drv sg
 
a second time has been known to succeed and you can proceed to step 10.
 
Note: Unloading the sg driver may impact NetBackup performance.

10. Use the provided script to re-create the /kernel/drv/sg.conf file, append the SCSA entries to /etc/devlink.tab and reload the sg driver:
# ./sg.install
 
11.  Reboot the server

12. Now sgscan should see the appropriate devices:
# /usr/openv/volmgr/bin/sgscan all conf -v

For further information, consult the appropriate  Symantec NetBackup (tm) Media Manager Device Configuration Guide.
 



Legacy ID



266501


Article URL http://www.symantec.com/docs/TECH31047


Terms of use for this information are found in Legal Notices