cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding of SG BUILD

NBU2010
Level 6

Dear Forum,

I am facing problem with tape drive visibility on netbackup.

Total 8 drive should be visible but only 7 is getting detected on nbu.

On OS and OBP level i m getting it but not in netbackup.

I have tried rebuilding sg, rebooting media server etc.but no luck.

MY ? is : Need to understand -mt & -ml while giving for sg.build

Can you pls. explain or any good doc on this to understand it.

 

Thanks

 

23 REPLIES 23

NBU2010
Level 6

Hello Martin,

After giving the steps given by you...when i checked the sgscan ...none of the tapes were getting detected on the media server.

 

NBU2010
Level 6

Hello,

I tried first with sg.build all but with no luck...and then adding the enteries in both the files...but that too didnt helped.

Finally,

I performed the following and was able to get all the 8 drives...

1) identify the Target and Lun values
a) run the command ls -l /dev/rmt/*cbn
i) output will be a list of all scsi tape (st) drives that were configured on boot
b) output might wrap to second line, look at end of line where it reads [...]st@T,L:cbn
c) the value between the @ and the comma is the Target
i) in some cases the Target can be a WWN
d) the value between the comma and the : is the Lun
e) see man page on st(7D) for explanation
2) identify the maximum value of Target and Lun values
a) examine the output and look for the highest Target and Lun values.
i) The Target and Lun values are in hexadecimal, convert to decimal before proceeding
b) not necessary to convert Target value if it's a WWN
3) go to driver directory
a) cd /usr/openv/volmgr/bin/driver
i) all your commands will be run FROM THIS DIRECTORY
4) if Target is a WWN
a) run the command ../sg.build all (make sure to include the two leading periods)
i) if the maximum Lun value above is 1 or higher, add a "-ml L" to this command with L being the highest value found from step 1.
5) if Target is not a WWN
a) run the command ../sg.build all -mt T -ml L  (make sure to include the two leading periods)
i) where T is the decimal value of the highest Target found in step 1
ii) where L is the decimal value of the highest Lun found in step 1
6) remove old sg.conf file
a) rm /kernel/drv/sg.conf
7) install new driver configuration files
a) ./sg.install (make sure to include the single leading period)
8) verify correct sg operation by running scan
a) /usr/openv/volmgr/bin/scan
or
b) /usr/openv/volmgr/bin/goodies/scan


Thanks for all the help and suggestions...as always..

 

Marianne
Level 6
Partner    VIP    Accredited Certified

If we look at your steps and the steps that I have posted over here, you will agree that if you followed the steps in my post exactly, it would've worked, right?

Your steps: 

 in some cases the Target can be a WWN
 the value between the comma and the : is the Lun
...  not necessary to convert Target value if it's a WWN
 
We already new this from /dev/rmt listing in your 2nd post. 
I have therefore not listed -mt and -mt options.

 
 
3) go to driver directory
a) cd /usr/openv/volmgr/bin/driver
i) all your commands will be run FROM THIS DIRECTORY

Exactly as per my steps:

 # cd /usr/openv/volmgr/bin/driver

If steps are run from ANY other folder, the sg.links and sg.conf file is created in the wrong place and sg.install will not use the newly created templates. Older and probably incorrect files in driver folder will still be used. 

4) if Target is a WWN
a) run the command ../sg.build all (make sure to include the two leading periods)
My step:
# /usr/openv/volmgr/bin/sg.build all 

There is no need for leading dots if the full path is specified.

We new target is wwn from your /dev/rmt listing. 
​I have therefore not listed -mt and -mt options. 

6) remove old sg.conf file
a) rm /kernel/drv/sg.conf
7) install new driver configuration files
a) ./sg.install (make sure to include the single leading period)
8) verify correct sg operation by running scan
a) /usr/openv/volmgr/bin/scan

My steps: 

Install the new sg driver configuration:

# /usr/bin/rm -f /kernel/drv/sg.conf
# /usr/openv/volmgr/bin/driver/sg.install

Check/verify config:

# /usr/openv/volmgr/bin/sgscan

 

So... you will agree that your steps is just a longer version of mine, right? 

I always have my steps in a text file and simply copy & paste. 
Especially when target is wwn.
Works every time!

mph999
Level 6
Employee Accredited
Sorry if my files didn't work, not sure why - if you feel like posing up the 'working' sg.conf file I should be able to see why. As per my first post on this, if drives are configured using FC (which you confirmed they were) then you do not use -ml/ -mt options. Therefore Mariannes steps would have worked, sg.build all is all that should be required. I thought this had been done and it still hadn't worked (which happens sometimes, but not often) - hence my manual files ... You had 100s of lines in the files, most of which had no device. This massively slows down scan/ device wizard / tpautoconf commands and is why you shouldn't use mt/ ml options if things aren't configured using targets/ luns.