Trusted Contributor.. Trusted Contributor..
Trusted Contributor..
628 views

Find out what tape is in drive (Script)

Hello ,

I woud like to know if is possible find out what tape is mounted in drive (magnemtic LTO tape drive ) for DP 7.01.

Basicaly I have created script which show status (free || disabled ||  tape ) for all drives in libraries  but it is not works for 100%.

 

I have used for this purpose command `omnimm -show_locked_devs` . ... but in case that backup is using 2 drives then it is not possible find out which tape belongs to which drive due to same entries in output (See output example => only location is different in such case).

btw: tape label is find according location in library

 

In case that session with PID 1 using 2 drives (Drive1 and Drive2) output from omnimm -show_locked_devs should be :

...

Type: Device
Name/Id: Drive1
Pid: 1
Host: cell1

 

Type: Device
Name/Id: Drive2
Pid: 1
Host: cell1

 

Type: Cartridge
Name/Id: Lib1
Pid: 1
Host: cell1
Location: 1

 

Type: Cartridge
Name/Id: Lib1
Pid: 1
Host: cell1
Location: 2

...

 

So, if you know how to do that then please let me know.  THANK YOU!

Tags (3)
0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

Re: Find out what tape is in drive (Script)

If you want a Media label, or a Barcode lable, then the answer is no, not at this time, and I doubt if it will ever be implemented

 

The closest we can come is from teh session report, where it will show something like

 

"Loading Media from slot 2"

 

or something similiar.  I guess you may be able to use the DP environment variable SESSIONKEY to get a current copy of  a report for the running session, save it to a file, and extract from there, but, nothing else comes to mind

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Find out what tape is in drive (Script)

Hi,

 

please post the script you have prepared so far... the rest can be done using UMA command.

 

Best regards

Daniel

-----------
Please assign Kudos - How to assign...
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Find out what tape is in drive (Script)

Hi again,

 

best is to write me a mail to complete the script - daniel-braun@data-protector.org.

 

Best regards

Daniel

-----------
Please assign Kudos - How to assign...
0 Likes
Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Re: Find out what tape is in drive (Script)

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Find out what tape is in drive (Script)

don't know if you can script it but with "uma -ioctl <dev> -barcode" and "stat d" you can list out what is currently mounted.

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.