Steps to rebuild the /dev/sg/* and /dev/rmt/* devices on a Solaris Master or Media server

Copied directly from Symantec Article URL

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 file:
# cp /etc/ /etc/`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/ 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):
../ all -mt -ml

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/ 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


Leave a Reply

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

You are commenting using your 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