Here are the basic steps to rebuild the /dev/sg/* and /dev/rmt/* devices on a Solaris server without rebooting.
1. Create a backup copy of the current st.conf file:
# cp /kernel/drv/st.conf /kernel/drv/st.conf.bak
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.bak
3. Create a backup copy of the current devlink.tab file:
# cp /etc/devlink.tab /etc/devlink.tab.bak
4. Delete SCSI targets/LUNs from the /kernel/drv/st.conf file:
# This line adds support for Fibre Channel Tapes
name=”st” parent=”fp” target=0;
name=”st” class=”scsi” target=0 lun=0;
name=”st” class=”scsi” target=0 lun=1;
name=”st” class=”scsi” target=1 lun=0;
name=”st” class=”scsi” target=1 lun=1;
name=”st” class=”scsi” target=2 lun=0;
name=”st” class=”scsi” target=2 lun=1;
name=”st” class=”scsi” target=3 lun=0;
name=”st” class=”scsi” target=3 lun=1;
name=”st” class=”scsi” target=4 lun=0;
name=”st” class=”scsi” target=4 lun=1;
Remove all the entries so no duplicates are 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=0,1; sg/c\N0t0l1
type=ddi_pseudo;name=sg;addr=0,2; sg/c\N0t0l2
type=ddi_pseudo;name=sg;addr=0,3; sg/c\N0t0l3
type=ddi_pseudo;name=sg;addr=0,4; sg/c\N0t0l4
type=ddi_pseudo;name=sg;addr=0,5; sg/c\N0t0l5
type=ddi_pseudo;name=sg;addr=0,6; sg/c\N0t0l6
type=ddi_pseudo;name=sg;addr=0,7; sg/c\N0t0l7
type=ddi_pseudo;name=sg;addr=0,8; sg/c\N0t0l8
type=ddi_pseudo;name=sg;addr=1,0; sg/c\N0t1l0
type=ddi_pseudo;name=sg;addr=1,1; sg/c\N0t1l1
type=ddi_pseudo;name=sg;addr=1,2; sg/c\N0t1l2
type=ddi_pseudo;name=sg;addr=1,3; sg/c\N0t1l3
type=ddi_pseudo;name=sg;addr=1,4; sg/c\N0t1l4
type=ddi_pseudo;name=sg;addr=1,5; sg/c\N0t1l5
type=ddi_pseudo;name=sg;addr=1,6; sg/c\N0t1l6
type=ddi_pseudo;name=sg;addr=1,7; sg/c\N0t1l7
type=ddi_pseudo;name=sg;addr=1,8; sg/c\N0t1l8
type=ddi_pseudo;name=sg;addr=2,0; sg/c\N0t2l0
type=ddi_pseudo;name=sg;addr=2,1; sg/c\N0t2l1
type=ddi_pseudo;name=sg;addr=2,2; sg/c\N0t2l2
type=ddi_pseudo;name=sg;addr=2,3; sg/c\N0t2l3
type=ddi_pseudo;name=sg;addr=2,4; sg/c\N0t2l4
type=ddi_pseudo;name=sg;addr=2,5; sg/c\N0t2l5
type=ddi_pseudo;name=sg;addr=2,6; sg/c\N0t2l6
Remove all
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>
. ./sg.build all -mt 2 -ml 3
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
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. Now sgscan should see the appropriate devices:
# /usr/openv/volmgr/bin/sgscan all conf -v
VERITAS NetBackup ™ 5.0 Media Manager Device Configuration Guide for UNIX
Read Full Post »