Latest Stories
Social Media Limbo kamshin.com on hiatus Some thoughts on the new MacBook Pro Opportunities And Challenges With Personal Health Data – Looking at Garmin Data How The 2020 Pandemic Shaped My Year, And How My Family And I Coped With COVID

kamshin

  • Home
  • All Posts
  • Categories
    • General
    • Tech Field Day
    • Storage
    • Nutanix
    • Certifications
    • Conferences
    • Worth reading
    • Design
    • Rants
    • Active Directory
  • Media & Press
  • Podcast
  • About me
    • About me
    • Where is Max?
    • Disclosure & Policies

Automated Tape Withdrawal with EMC Networker

October 13, 2010

FacebookTwitter

NOTE: As of today, I am still solving several issues related to this that are peculiar to the way EMC Networker is implemented. Expect more updates on this issue.

 

Recently I've been designing a Backup GFS Rotation with EMC Networker (GFS Stands for Grandfather-Father-Son, google will be your friend). Things went quite smoothly up to the point where I had to tell networker to eject some of the tapes for off-site storage.

To make things a bit more understandable, the GFS rotation works upon this scheme:
– Daily backups from monday to thursday
– Weekly backups on friday
– Monthly backups on 1st of month
– Yearly backup on 31 December each year

The aim of a backup being to have data available in case of a crisis or catastrophical failure, we want to have weekly, monthly and yearly tapes stored securely and away of the production site. Because we have a tape library, we are able to manage a variety of tapes that are each set in a dfifferent pool and we have those from weekly monthly and yearly pools moved to the I/O station of the tape library. The I/O station is a tray that allows backup operators to either deposit or withdraw cartridges from the tape library.

Because I am not an expert with Networker (self upskilling has its limits), I have requested help from EMC. A very friendly Technical Support Engineer helped me figure out what was needed to gather the tape labels and to perform the withdrawal. However, it quickly appeared that our tape library doesn't supports 'ADD' and 'REMOVE' commands. I was therefore unable to rely on nsrjb -x -T [tape_label] -w to perform the extraction.

After talking with another TSE, we were able to check that our library (IBM TS3200, 4U) supports at least slot-based operations. That wasn't however very reassuring, as there was no evident way to link the volume label info returned by mminfo into something that would report a slot number or anything that nsrjb would process for the withdrawal operation. The only thing we came up with is that nsrjb launched without parameters prints a list of slots and volumes plus other data on stdout.

Without escape lane, I thought of a solution that would help me to link volume label and slot. The only place where I could get both was when launching nsrjb without parameters. But then, I needed to extract this data and compare it.

I thought that parsing nsrjb stdout with FOR /F would allow me to know which tape is on which library slot. But then I needed to make sure that we process only the tapes that are from today's backup set. Why today? Considering that the job is run only when weekly, monthly or yearly save groups are
ran, and that this is launched immediately after a save group completes, the 'today' parameter is relevant. For example: we are friday 1st october, the monthly job launches, when it finishes, savepnpc starts the required post-backup script (the one relevant to ejection), we check for backups that were completed today (completed just before the backup), tapes are found and are subsequently ejected.

Therefore, we filter the list of savesets returned by mminfo with the 'today' criteria (see full command below).
Then with the variables we have extracted to perform the comparison, we launch a 2nd batch file and pass these variables as script parameters (slot number and volume label). This batch will write an entry in a log file, then unload tapes that can be in the tape reader and moves them to the library, then moves tapes from the library into any available I/O station port.

The solution I designed is made of two scripts:
list.bat -> checks for today backups and returns volume labels, parses nsrjb output, searchs for a match between today's tapes and nsrjb output. If a match is found, the slot number and volume label are passed as parameters to match.bat

match.bat -> launched with two arguments: slot number and volume label. For every volume label, tries to unmount the tape from tape mechanism, moves it to any available I/O station port (in our case, 3 slots), then writes an entry to a logfile.

If your tape library is off-site, you can share this logfile on a network location with the teams that will be collecting the tapes. In order to ensure logging and quality, I recommend making up a yearly calendar with expected collection days and which kind of backup the team is expected to collect, in addition to this, keeping a log file of tape deposits/withdrawals is highly recommended.

I hope this solution will help some of you solve a quite annoying issue!

Cheers for now and stay hooked to the blog for more features!
Max

Here is the code of both files:

list.bat
FOR /F %%A IN ('mminfo -q "client=client_name,savetime>=today" -ot -r barcode') DO FOR /F "skip=3 tokens=1,2,3 delims=: " %%B IN ('nsrjb') DO IF %%A==%%C match.bat %%B %%A

match.bat
REM MATCH.BAT Slot_Number Volume_Label
ECHO "%date% – %time % – Ejecting volume %2 located into slot %1 into ports 1-3" >> C:\tape_withdraw.txt
nsrjb -u %2
nsrjb -w -S %1 -P 1-3

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Reddit (Opens in new window)

Related

A note to our readers

kamshin.com has a strict no advertisement policy. If you enjoy this website, please consider making a donation to one of these non-profit organizations that I personally support:


People in Need - Czech Republic

A Czech-based non-governmental, non-profit organization founded on the ideals of humanism, freedom, equality and solidarity, helping people in the Czech Republic and in the entire world.

People In Need Logo

Greenpeace

Hopefully this one doesn't requires any explanation. Act for our planet. Act now.

Greenpeace Logo

826 National

US-based charity. An international proof point for writing as a tool for young people to ignite and channel their creativity, explore identity, advocate for themselves and their community, and achieve academic and professional success.

826 National Logo

 


Electronic Frontier Foundation

The leading nonprofit defending digital privacy, free speech, and innovation.

EFF Logo

 


Thank you!

RSS Latest Podcast Episodes

  • EP 30 -Rose Ross Chief Tech Trailblazer on the Tech Trailblazer awards
  • EP29 – Imagine the possibilities to manage your data with Data Dynamics StorageX – with Piyush Mehta
  • EP28 – Introducing Clumio, A Cloud-Based Data Platform Launching With Data Protection As A Service – with Poojan Kumar
  • EP27 – VAST Data – A Revolutionary Storage Platform For The Next Decade – with Howard Marks

Categories

  • Active Directory (5)
  • Certifications (8)
  • Conferences (22)
  • Design (1)
  • Featured (1)
  • General (88)
  • Nutanix (4)
  • Rants (2)
  • Storage (38)
  • Tech Field Day (44)
  • Worth reading (4)

Latest Tweets

My Tweets

Popular posts this week

  • Using Virtual Machine custom attributes with PowerCLI for snapshotting
  • EventID 2080 - DsAccess & SACL Right fix
  • Cisco HyperFlex: Break-thru or Me-too?
  • Virtual Machines - Size matters!
  • Rubrik - A Refreshing Approach to Backups

Categories

  • Active Directory
  • Certifications
  • Conferences
  • Design
  • Featured
  • General
  • Nutanix
  • Rants
  • Storage
  • Tech Field Day
  • Worth reading

Pages

  • Blog
  • Disclosure & Policies
  • Home
  • Media & Press
  • VCAP5-DCD Resources
  • VCP5 Certification Resources
  • About me

Archives

Copyright ©2016 kamshin