• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

Deleting a Copy storage pool - any practical way ?

IvanWarren

Newcomer
Joined
Jun 19, 2009
Messages
3
Reaction score
0
Points
0
Gentlemen,

First, this is more of theoretical question as I am pretty much toying around with TSM at this point (self education), so this is no emergency !

Ok, here is what I am trying to do.

I have a copy storage pool defined over a certain device class. Let's now assume I wish to change to a new device class (say like changing to a new library or going from server-server virt volumes to tape...)

My question is : Assuming I have now created my new copy storage pool, backed up my primary storage pools to it and eventually set my COPYSTG attributes for my primary storage pools to the new copy stg pool (if I'm using simultaneous write), is there a simple way of getting rid of the redundant/obsolete copy storage pool ?
The only way I've found to do that was to manually delete each and every single volume that were in the old copy storage pool with discarddata=yes. If I have a bunch (and I mean - when doing server-server vtapes, winding up with hundreds of volumes even on small installations can happen very quickly !), it sure could become quite tedious to do that !

I mean.. Migrating a primary storage pool from 1 lib to another is trivial.. but copy storage pools seem to be a bit more complicated to handle when say migrating to new hardware or changing to a new setup.

Thanks,

--Ivan
 

wim

ADSM.ORG Senior Member
Joined
Aug 14, 2007
Messages
208
Reaction score
2
Points
0
The only way to perform the delete is by using the "delete vol discarddata=yes".
The easiest way would be perform the delete by scripting.
Or you can run a queury extracting all volumes and via cut&paste make the right command to delete each volumes and run the resulting script.

Regards. Wim.
 

Jeff_Jeske

ADSM.ORG Senior Member
Joined
Jul 17, 2006
Messages
485
Reaction score
7
Points
0
Location
Stevens Point, WI
Website
http
Here is our procedure for a similar activity.... it will work for what you need to do:

Mass Deletion of Virtual Volume Copy Pool volumes

1. Background

On occasion it is necessary to delete a large number of copy pool volumes in order to delete a storage pool that is no longer in use. Here are the restrictions placed by TSM.
---------------------------------------------------------------------------------------------
DELETE STGPOOL

DELETE STGPOOL (Delete a Storage Pool)

Use this command to delete a storage pool. To delete a storage pool, you must first delete all volumes assigned to the storage pool.

Attention: Do not delete a storage pool that is specified as a destination
for a management class or copy group in the ACTIVE policy set. Client
operations might fail as a result.

You cannot delete a storage pool that is identified as the next storage pool
for another storage pool. For more information on storage pool hierarchy,
see the NEXTSTGPOOL parameter in the DEFINE STGPOOL command.
---------------------------------------------------------------------------------------------

One occasion was the creation of a new location for copy pools for the remote offices. They had been on virtual volumes on SERVER1 in the SERVER1_POOL. This server came up for decommission and new copy pools were created on SERVER1 in the SERVER2_POOL. This left thousands of 500MB volumes in the SERVER1_POOL which had database entries in the respective TSM instance databases. In order to delete the storage pool, the volumes needed to be deleted first.

2. Process

There are 2 scripts. These are the MakeVolsFile.cmd and the DelVirtVol.cmd. The DelVirtVol.cmd uses a list of volumes in a Volumes.txt file that is generated by the MakeVolsFile.cmd.

A. Preliminary Steps
From a TSM admin console run the following command against the server where you will be deleting volumes.

Select STGPOOL_NAME, STATUS, count(*) as "VOLUMES" from volumes where stgpool_name='storage pool name' group by STGPOOL_NAME,STATUS (this gives a count of how many volumes are in the pool. Name must be in CAPS)

Set reclamation to 100 on the storage pool where volumes are being deleted.
Example:
Update stg shobus03_pool reclaim=100


B. Creating the volumes file
Copy the MakeVolsFile.cmd and the DelVirtVol.cmd to the C:\Program Files\Tivoli|TSM\baclient file on the server where the copy pool resides, i.e. in the remote office case that would be the remote office TSM server.

On that server open a windows command line, change the path to C:\program files\tivoli\TSM\baclient. Run the MakeVolsFile.cmd and pass it 3 parameters, TSM admin account, TSM password, and copy pool name. Copy pool name must be in caps.
Example:

MakeVolsFile.cmd MYACCOUNT MYPASSWORD SERVER1_POOL

This will create the volumes.txt file in C:\program files\tivoli\TSM\baclient. The file will open in notepad when the script is done.

C. Running the volume deletion

Now Run the DelVirtVol.cmd and pass it 3 parameters, TSM admin account, TSM password, and TSM instance name of the copy pool instance. Nothing here is case sensitive.
Example:

DelVirtVol.cmd MYACCOUNT MYPASSWORD SERVER1_TSM1

The volumes will be deleted one at a time. This may take a while if you have a large number of volumes. When complete the script will present the following message. You may want to run the script with only a few file names in the volumes.txt file as a test for the first deletion.

-----------------------------------------------
--- Finished processing worklist. ---
-----------------------------------------------

The deletion is complete. The copy pool is now empty and can be deleted from the TSM instance.

D. Clean up

Delete the MakeVolsFile.cmd, DelVirtVols.cmd and Volumes.txt from the c:\program files\Tivoli\TSM\baclient folder.
 

Attachments

nikhil_1707

ADSM.ORG Member
Joined
Jan 10, 2008
Messages
161
Reaction score
0
Points
0
Hi Jeff,

the first 2 points went well and volumes.txt report generated successfully
but when I am trying to using the 3 point del vol by giving the instance name it is not working
going directly to


One or more lines in the volumes file did NOT contain the
specified pool trbck10. These lines might refer to pools
other than the desired pool.
 

Makoto

Newcomer
Joined
Jun 17, 2020
Messages
1
Reaction score
0
Points
0
Hi Jeff,

the first 2 points went well and volumes.txt report generated successfully
but when I am trying to using the 3 point del vol by giving the instance name it is not working
going directly to


One or more lines in the volumes file did NOT contain the
specified pool trbck10. These lines might refer to pools
other than the desired pool.
Hi nikhil_1707!

Got the same results as you've reported this, but just wanted to give a heads up.

I had to remove the "delims=\\ tokens=1" from the FOR command as my tapes had some special characters on their names.

I've also scraped the "BADPOOLFOUND" part and then the delete volume process have started successfully.

~
BTW, thanks @Jeff_Jeske for providing us with this awesome script!
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 20 19.0%
  • Keep using TSM for Spectrum Protect.

    Votes: 63 60.0%
  • Let's be formal and just say Spectrum Protect

    Votes: 13 12.4%
  • Other (please comement)

    Votes: 9 8.6%

Forum statistics

Threads
31,828
Messages
135,735
Members
21,789
Latest member
Fred49
Top