cancel
Showing results for 
Search instead for 
Did you mean: 

COmmand to check the drive status

VEN
Level 3
Hi All

Can anubody please tell the command to check the drive status from Master server to all the media servers as i need to check the drive status in all the media servers. 

Please let me know ASAP. 

Thanks in advance...

Regards 
VEN 
1 ACCEPTED SOLUTION

Accepted Solutions

Andy_Welburn
Level 6
15 REPLIES 15

Andy_Welburn
Level 6
quick enough? ;)

kumar3
Level 4
Certified
You can try this command to view status from any media and master server.

#cd /usr/openv/volmgr/bin/
#./vmoprcmd -dp -h <media server name>

It will give u output as like this:

root@mastgerserver # ./vmoprcmd -dp -h mediaserver
 
                                PENDING REQUESTS
 
                                     <NONE>
 
                                  DRIVE STATUS
 
Drv DrivePath                                             Status  Label  Ready
  1 /dev/rmt/1cbn                                           UP      -     No  
 
                             ADDITIONAL DRIVE STATUS
 
Drv DriveName            RecMID ExtMID Wr.Enbl. ReqId  Assigned        Shared
  1 AA-TLD4-Drive12                      -        0    -                No



HOPE THIS HELPS

VEN
Level 3

It helps me a lot

Thanks Buddy

 

sdo
Moderator
Moderator
Partner    VIP    Certified
The command that the device monitor component of the admin GUI is:
$ vmoprcmd -M mymaster -devmon

Then perhaps write a script to process the list?

Andy_Welburn
Level 6
should give you everything/most things!!

sdo
Moderator
Moderator
Partner    VIP    Certified
Andy is correct.  The "vmoprcmd" command on its own is the same as when using the "-devmon" switch.

I have two scripts.  Both are MS/Win based.  One collects "vmoprcmd" every fifteen minutes.  And another is an "HTA" (i.e. HTML with embedded VBScript) that draws an auto refreshing display of RAG (Red/Amber/Green) status of our tape drives.  The HTA app can be called from anywhere, i.e. your own desktop, your Operations team etc, your wall mounted RAG screen.  Basically, it's a poor man's tape drive status monitor.  Only one script queries NetBackup every fifteen minutes, thus the impact on the master is very very low.  All other workstations do not need NetBackup installed to view the tape drive status, and thus all the monitoring has no impact on NetBackup.

I can post here.  But you'll need to modify it for your environment.

sdo
Moderator
Moderator
Partner    VIP    Certified
Looks like this:
netbackup-tape-drive-status-collect.jpg

Poor_NBU_Admin
Not applicable

lu
Level 6
This script is also useful (detect down & auto up): https://www-secure.symantec.com/connect/downloads/script-drive-down-notification-and-automatically-drive

RickyC1
Level 1
Hi,

This script looks great. Can you post it any where so i give it a try?

Thanks.

sdo
Moderator
Moderator
Partner    VIP    Certified
Script works in two parts:
1) A DOS "bat" script runs on a Windows media server via scheduled tasks (but could easily be converted to ksh and cron) to wake up every 15 minutes and simply issue a "vmoprcmd -devmon" to collect/save the state of all tape drives in the environment to a flat text file.
2) An "hta" (i.e. VBScript embedded within html) that reads the saved file and builds a string of HTML to display within the "hta" (i.e. Internet Explorer) instance.  This can be run from anywhere, as it reads the file above.

How I configure it:
1) Create a folder on a media server.
2) Place both script files in that folder.
3) Create a Windows scheduled task to run the "bat" script every 15 minutes.
4) Share the folder to everyone with "read-only" access rights.
5) From your workstation, browse to the share above (or map a drive) and double click the "hta" script, so that it runs on your workstation.

sdo
Moderator
Moderator
Partner    VIP    Certified
The DOS bat file script is attached.
Save it as "netbackup-tape-drive-status-collect.bat".

Change the string "set z_master=mymaster" to be your master server name.

sdo
Moderator
Moderator
Partner    VIP    Certified
The ".hta" script is attached.
Save it as "netbackup-tape-drive-status-monitor.hta".

At my site, we have a clustered master and six non-clustered media servers.  The script is written for this environment.  You will have to change the code to suit your environment.

Look for the two areas of code that have "CHANGE ME - START" and "CHANGE ME - END" around them.

Also, look/search for anywhere/everywhere in the code where the strings "media1", "media2",... "media6" are used.  You'll have to change these to be the names of your media servers.

Good luck.

sdo
Moderator
Moderator
Partner    VIP    Certified
Oh, and a little NetBackup tick icon file, can be placed in the same folder...  makes the top left corner of the GUI display look a little bit better :)

Save it as "netbackup-tape-drive-status-monitor.ico".

sdo
Moderator
Moderator
Partner    VIP    Certified
Please don't plagiarise my work and claim it as your own.  If you like the script and use it, then please leave the header and version table intact.