sofromt Trusted Contributor.
Trusted Contributor.
725 views

Query Tape drive for Media Information

Hello,

i should know what tape is loaded in a drive via CLI on a Windows DP Envoirenment, is this somehow possible, i checked the CLI Guide but couldn't find any useable informaiton.

Regards

 

0 Likes
7 Replies
Highlighted
Knowledge Partner
Knowledge Partner

Re: Query Tape drive for Media Information

Hi @sofromt,

The best commands would be omnidbutil -show_locked_devs, omnistat and omnistat -detail -session <SessionID>.

Regards,
Sebastian Koehler

---
Please use the Like button below, if you find this post useful.
0 Likes
sofromt Trusted Contributor.
Trusted Contributor.

Re: Query Tape drive for Media Information

omnidbutil.exe is just available on the cell server right?

I need a solution from a client.

Also omnistat just shows running/completed sessions, but i should check if the correct media is inserted into the drive before a backup will be started.

0 Likes
Knowledge Partner
Knowledge Partner

Re: Query Tape drive for Media Information

Hi @sofromt,


@sofromt wrote:

omnidbutil.exe is just available on the cell server right?

I need a solution from a client.

This is correct. It only exists on the CM and it will only report what has been loaded by the Session Managers. Do you need this for standalone tape drives? This is something completely different.

Also omnistat just shows running/completed sessions, but i should check if the correct media is inserted into the drive before a backup will be started.


For a standalone tape drive this is complicated, because Data Protector is optimized for Tape Library usage. But there is a way from a client with Media Agent installed and the tape drive attached. Look for medLabel and medId. Please keep in mind that this is a physical read operation. The tape device can be found using the devbra -dev command.

O:\OmniBack\bin\utilns>TapeAnalyser.exe -type 13 -device Tape2147483643:4:0:0:0C -header
Opening medium Tape2147483643:4:0:0:0C
=================================
===============   MEDIUM START BLOCK   ===============
6e4e4253 41424344  0     0        0        0        1  MA_BLK_START   MA_BLK_NULL
0 8192 236 medDateInitialized = 28.08.2017 11:32:26 medDateLastAccess = 11.03.2018 21:56:02 medDateLastWrite = 11.03.2018 21:56:02 medDateLastOverwrite = 11.03.2018 21:56:02 medNumWrites = 0 medNumOverwrites = 1 devInfoLength = 24 devInfoOffset = 344 medID = 28c819ac:59a3e32a:549c:000c medLabel = AAT482L7 medLocation = poolLabel = JEPLIB02_Free devCapacity = 1564406784 devCapacityHi = 1 medFmtVersion = 3 medDFType = 0 medDFSubType = 0 ----------------------------------------- DEVICE INFO STRUCTURE of MAStartBlock: devType = 13 devBlkSize = 262144 woeStartPos = 0 woeEndPos = 0 segNum = 0

Regards,
Sebastian Koehler

---
Please use the Like button below, if you find this post useful.
Micro Focus Expert
Micro Focus Expert

Re: Query Tape drive for Media Information

Hello  sofromt,

I would like to comment but I need to clarify - do you want to know what tape is currently loaded in the drive?

If a tape is currently loaded in the drive, then you have an active session - a backup or restore or media management operation, and at this point you have to be very careful as you dont want to disturb the current DP I/O operation.

The one recommended by Sebastian is very much correct.

omnidbutil -show_locked_devs

or

omnistat and omnistat -detail -session <SessionID>

 

If this is a tape library, then you should query when the tape is in the slots.

omnimm -repository_update <DriveName>

omnimm -repository <LibraryName>

omnimm -repository_barcode_scan <LibraryName>

 

If you have a stand-alone drive, then you load the tape into the drive manually and query

omnimm -repository_update <DriveName>

or

omnimlist -device <BackupDevice>

 

Hope this helps

Rgds,

Sherman

DP Support

sofromt Trusted Contributor.
Trusted Contributor.

Re: Query Tape drive for Media Information

It's a single drive,

looks like omnimm -repository_update <DriveName> is what i'm looking for.

0 Likes
Knowledge Partner
Knowledge Partner

Re: Query Tape drive for Media Information

Hi @sofromt,


@sofromt wrote:

looks like omnimm -repository_update <DriveName> is what i'm looking for.


This creates a media session and somewhere in the session messages you'll find the label, if it has been already initialized. In my tests TapeAnalyser is the fastest solution, but this really depends on what you want to accomplish. omnimlist -device <DriveName> scans the whole media. So this is not an option.

Regards,
Sebastian Koehler

---
Please use the Like button below, if you find this post useful.
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Query Tape drive for Media Information

Hello  sofromt,

I would assume that this is an AUTOLOADER and as such, you have to manually load the tape into the slot.

And then you can run the CLI query.

You can also try these other CLI

omnimlist -device <BackupDevice> -monitor -detail

omnimlist -device <BackupDevice> -header -monitor

omnimlist -device <BackupDevice> -catalog -monitor

 

Hope it helps

RGds,

Sherman

DP Support

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.