User Tools

Site Tools


tsm:tsm_container_reduce

TSM reduce size of a container stgpool

http://www-01.ibm.com/support/docview.wss?uid=swg22004973

Starting with Spectrum Protect v8.1

Question

How can the container sizes of directory container stgpools be reduced if the amount of data held in that stgpool decreases significantly ?

Cause

When the amount of data stored in a directory container stgpool decreases, the size of the containers is not reduced accordingly. The exception are fringe cases where a defragmentation process is started to recover space from a container.

This works as designed.

Answer

The following procedure can be used to reduce the container sizes using the special server option NOMOVEPREALLOC which is currently not documented in the Knowledge Center:

*** Note: You should use this process when there is very little activity on the server.

1) Verify the current container configuration with:

tsm> q container stg=deduppool f=d

2) Run the following TSM server command:

tsm> SETOPT NOMOVEPREALLOC YES

During a MOVE CONTAINER process the server can then allocate space in new containers based on the used space in the source containers rather than pre-allocate space based on the size of the source container files.

3) Ensure you have free space available at the OS level in the directory for the new condensed containers. The free space should amount to the size of the source container you want to condense.

4) Issue the MOVE CONTAINER command (see the link below) for one container you choose.
Ex:

move container /data1/storage/dir1/00/0000000000000001.dcf stgpooldir=/data/storage/dir2

5) Wait for the running MOVE CONTAINER process to finish. If all containers you intend to condense have been dealt with, go to step 5. To condense another container go to step 2.

6) After all chosen containers have been processed, run the TSM server commands:

tsm> RESET CONTAINERSIZE DEDUPPOOL
tsm> SETOPT NOMOVEPREALLOC NO

7) Verify the new container configuration with:

tsm> q container stg=deduppool f=d 

DELETE STGPOOLDIRECTORY (Deleting a storage pool directory)

You can issue this command only when no containers are assigned to the storage pool directory. Issue the QUERY CONTAINER command to determine whether any containers are assigned to the storage pool directory.

To remove containers from a storage pool directory, you must issue the UPDATE STGPOOLDIRECTORY command and specify the ACCESS=DESTROYED parameter. Then, issue the AUDIT CONTAINER command and specify the ACTION=REMOVEDAMAGED parameter. Verify that the containers are removed.

Protect: TSM2>select * from occupancy where stgpool_name='CONTAINER01'

     NODE_NAME:
          TYPE:
FILESPACE_NAME:
  STGPOOL_NAME: CONTAINER01
     NUM_FILES: 0
   PHYSICAL_MB:
    LOGICAL_MB:
  REPORTING_MB: 0.00
  FILESPACE_ID:
Protect: TSM2> update stgpooldirectory CONTAINER01 /tsm/CONT01 access=destroy
Protect: TSM2> AUDIT CONTAINER stgpool=CONTAINER01 ACTION=REMOVEDAMAGED
Protect: TSM2> delete stgpooldirectory CONTAINER01 /tsm/CONT01

FIXME

If the deletion doesn't work, may you have pending containers related to a previous move container, so best way is to wait the reuse delay to try again, here one day

Protect: TSM2>q container

Container                              Storage          Containe-     State
                                       Pool Name        r Type
-------------------------------------  ------------     ---------     -----------
/tsm/CONT01/09/00000000000009d1.dcf    CONTAINER01      Dedup         Pending
/tsm/CONT01/09/00000000000009e1.dcf    CONTAINER01      Dedup         Available

Protect: TSM2>q stg CONTAINER01 f=d
                     Storage Pool Name: CONTAINER01
      Delay Period for Container Reuse: 1
tsm/tsm_container_reduce.txt · Last modified: 2023/11/14 10:18 by manu