IBM Support

Understanding Storage Allocation with Virtual Tape and How to Get the Storage Back after a Save or INZTAP

Troubleshooting


Problem

This document explains storage allocation with virtual tape and how to get the storage back from a virtual tape after it has been used or initialized.

Resolving The Problem

Depending on how a virtual volume is created, the space is either preallocated when the ADDIMGCLGE command is run or is allocated by the system during the save operation.

Allocation of storage space when a virtual volume is created:
The following command will create VOL001 with a maximum size of 900GB, and it will take up 900GB of space:
ADDIMGCLGE IMGCLG(IMGCLG) FROMFILE(*NEW) TOFILE(VOL001) IMGSIZ(900000) ALCSTG(*IMGSIZ) VOLNAM(VOL001)

The following command will create VOL002 with a maximum size of 900GB; however, it will only allocate less than 1MB initially:
ADDIMGCLGE IMGCLG(IMGCLG) FROMFILE(*NEW) TOFILE(VOL002) IMGSIZ(900000) ALCSTG(*MIN) VOLNAM(VOL002)

Allocation of storage space after the save:
If a 500GB save is performed on VOL001, the allocated size will still be 900GB.
If a 500GB save is performed on VOL002, the allocated size will only be 500GB.

Allocation of storage space after an INZTAP:
If VOL001 is initialized after the 500GB save, the allocated size will remain at 900GB.
If VOL002 is initialized after the 500GB save, the allocated size will remain at 500GB.

Reducing the allocated storage space after an INZTAP:
After an INZTAP, the space that was used for the save remains allocated, even if the volume was created with ALCTSTG(*MIN). In order to reduce the allocated space after the INZTAP, specify ALCSTG(*MIN) on the CHGIMGCLGE command. For example:
CHGIMGCLGE IMGCLG(IMGCLG) IMGCLGIDX(*VOL) VOL(VOL001) ALCSTG(*MIN)

Reducing the allocated storage space after a save, but keeping the data:
If a volume was created with ALCSTG(*IMGSIZ), then all of the space is preallocated. However, you can shrink volume down to the size of the data. In the following example, VOL001 is reduced from 900GB of used space down to 500GB of used space after a 500GB save:
CHGIMGCLGE IMGCLG(IMGCLG) IMGCLGIDX(*VOL) VOL(VOL001) ALCSTG(*MIN)

Note: When using the INZTAP command .. DO NOT use the CLEAR(*YES) parm.

Note: Before reducing or changing the size of the image catalog entry, the entry needs to be unloaded. If the entry is not unloaded, msgCPD4F03 will be issued:
CPD4F03 - Value for IMGSIZ and WRTPTC parameters must be *SAME.
The following command can be used to unload the entry: LODIMGCLGE IMGCLG(IMGCLG) OPTION(*UNLOAD)

Viewing size of storage used by a virtual volume:
To view the actual amount of space allocated by a virtual volume, you can display the attributes of the *STMF object in the IFS directory:
1. WRKIMGCLGE IMGCLG(imgclg_name) and note the Directory in the top left.
2. WRKLNK '/directory_path_in_step_1'
3. Select Option 5 to display the image catalog directory
4. Select Option 8 on the volume to display the attributes
5. Page down to the size of data and the allocated size of the object (listed in bytes):

Size of object data in bytes . . . . . : 4096
Allocated size of object . . . . . . . : 12288
Note: If the volume is enrolled in BRMS, the volume must be expired.

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CMoAAM","label":"Image Catalog"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

500123812

Document Information

Modified date:
01 November 2024

UID

nas8N1013457