How to determine required volumes for a restore?

ldmwndletsm

ADSM.ORG Senior Member
Joined
Oct 30, 2019
Messages
232
Reaction score
5
Points
0
Let's say that a file space is on 10 primary tapes, but I'm restoring a subdirectory. Maybe I run a `q filespace nodename` to get the FSID, and then I use that to query the volumeusage table to get the volume names. Great. But how do I know which ones contain the subdirectory that I want to restore? How would I know which tapes to load, assuming some were on shelf? Once I start the restore, I can check the TSM activity log, and it will report the tapes that it wants, but is there some other way to know before I start the restore?

If I run dsmc on the client, with the details option, it only reports the Volume_ID, not the volume name. Is there some way to translate that into a volume name? Where does TSM stash away that silly Volume_ID, anyway?

Also, is there a way to get a similar list of the required copy pool volumes?

It sure would be convenient if dsmc would simply report the volume name(s) and also provide the copy pool volume name(s) also, assuming those exist.
 
What's the use case for that?

The server keeps track of all that so that you don't have to.
 
The use case is what if not all of the tapes are in the library? How do you know which ones to load? Are you going to load all of them for that file space if only one or two are required to restore some of the files under there? Or what if some of the on-site copies were unreadable or lost, and you had to go off site? How are you going to know which of those volumes to return?

This actually happened the other day. I had to recover 5 files, but not all of the tapes were nearline. Since there were so few files, I was able to track down the actual tapes that they lived on using the three-step method (https://adsm.org/forum/index.php?threads/helpfull-tsm-select-statements.24120/#post-126285) to determine which tape a file lives on. Turns out, of the 10 plus tapes for the file space, only two were needed. File 1 of 5 was on tape 1, and files 2-5 were on tape 2. But if I'd had to restore a lot more than just 5 files, I guess I would have just asked for all of them to be loaded or simply waited to see what the activity log reported after starting the restore?

Is there some way to run the restore in an informational mode wherein it will report this to you without attempting a restore?
 
Is there some way to run the restore in an informational mode wherein it will report this to you without attempting a restore?
I don't know of another way.


The use case is what if not all of the tapes are in the library?
Spectrum Protect is designed to work best when all the tapes from the primary pools are checked in the library. Otherwise, client restores will fail as you discovered, and other processes like reclamation cannot reclaim the tapes either.


Or what if some of the on-site copies were unreadable or lost, and you had to go off site?
You audit volume stgpool=primarypool, then to a restore stgpool preview=yes, this will give you the list of offsite tapes needed to restore the primary pool, then you do a restore stgpool without the previous once the offsite tapes are checked in.
 
I don't know of another way.
Okay, If I ever find it, I'll post it here. There's probably some obscure way to wrest this information out of it. Seems it tracks everything under the sun.

Spectrum Protect is designed to work best when all the tapes from the primary pools are checked in the library. Otherwise, client restores will fail as you discovered, and other processes like reclamation cannot reclaim the tapes either.
Good point. We're low on storage slots at this time so some tapes have had to be shelved. There is no reclamation done on that storage pool, though, so TSM isn't going to request them unless a restore is done.

You audit volume stgpool=primarypool, then to a restore stgpool preview=yes, this will give you the list of offsite tapes needed to restore the primary pool, then you do a restore stgpool without the previous once the offsite tapes are checked in.

I was thinking of a case where you needed to restore some files really quickly, and you didn't have time to rebuild the onsite tapes until a little later. Knowing which tapes to bring back would be handy.
 
Back
Top