Managing virtual tape

Learn the necessary steps to manage your virtual tape.

Perform a save operation
To save to virtual tape storage, see Virtual tape media.
Perform a restore operation
To restore from virtual tape storage, see Recovering your system.
Duplicating virtual tape to physical media
When you duplicate virtual tape volumes to physical tape devices you need to make sure that the virtual tape volumes are created using a block size that is compatible with your physical tape device. The density (format) of the virtual tape volumes is used to control the maximum size for the blocks of data on the virtual tape volume. To determine the block size that your tape device supports, see Formatting of virtual tape images.
Using volumes in dependent image catalogs
A dependent catalog provides a read-only view of the virtual tape volumes that are within a reference image catalog. For example, if an image catalog existed named JOE, then the following command would be entered on the command line to create a dependent image catalog based on image catalog JOE:
CRTIMGCLG IMGCLG(JOEDEP) DIR(*REFIMGCLG) TYPE(*TAP) REFIMGCLG(JOE) 
All of the volumes in the reference image catalog (JOE) are accessible when the dependent image catalog (JOEDEP) is mounted in a separate virtual tape device. The dependent image catalogs are not synchronized with additional changes that are made to the reference image catalog. Multiple dependent image catalogs can be created all pointing to the same reference catalog. The same virtual tape volume can be mounted in several virtual devices at the same time through the use of dependent image catalogs. This mounting procedure enables the same virtual tape volume to be used for input operations by multiple users at the same time.
A volume cannot be mounted for both read-only and read-write at the same time. A volume that is already mounted in a device by a dependent catalog cannot be mounted in a different device by a reference catalog. A volume that is already mounted in a device by a reference catalog cannot be mounted in a different device by a dependent catalog.
Using virtual tape from other partitions or iSCSI attached server
A Linux guest partition or an iSCSI attached server can use the virtual tape devices and the currently mounted volume.
The IBM® i host partition must mount the virtual tape volume before it can be used by another partition or iSCSI attached server.
  1. Make sure that the virtual tape device description has the Unload device at vary off parameter set to *NO.
  2. Mount the virtual volume in the virtual tape device using the image catalog commands.
  3. Make sure that the virtual volume density is *VRT256K.
  4. Vary off the virtual tape device.
    Note: The virtual volume is still mounted.

The other partition or iSCSI attached server can now use the previously mounted virtual tape volume through the virtual I/O to the virtual tape device. The other partition or iSCSI attached server can only use the mounted volume because volume spanning is not supported.

The virtual tape device is configured as a 3580 model 002 tape device to the other partitions or iSCSI attached servers.

Note: The image catalog commands should not be used to remove or change the virtual tape volumes while they are being used by other partitions.
Additional information.

IBM i integration with servers

Integrated server through iSCSI

Using virtual tape volumes in user ASPs
  1. Create a User Defined File System for the user ASP that can be made visible to the rest of the integrated file system name space.
    • CRTUDFS UDFS('/dev/qaspXX/aspXX.udfs'), where XX is the ASP number
  2. Add a new directory to the system that will be used as the mount point directory for the User Defined File System created in step 1.
    • MKDIR DIR('/your-path') to make a mount point directory
  3. Make the objects in the User Defined File System accessible to the integrated file system name space. The mount point directory is assigned as the first part of the path name, which is used to access the objects.
    • MOUNT TYPE(*UDFS) MFS('/dev/qaspXX/aspXX.udfs') MNTOVRDIR(your-path)
      Note: Anything that is created in '/your-path' is created in the UDFS.
  4. Use the CRTIMGCLG command to create an image catalog with the mount point in the first part of the path name.
    • CRTIMGCLG IMGCLG(USERASP) DIR('/your-path/image-directory') TYPE(*TAP)
Note: You cannot specify only the mount-point directory when you specify a path-name with the CRTIMGCLG command. The path name must include a directory below the mount-point directory.
Using virtual tape volumes in independent disk pool
To use a virtual tape volume in an independent disk pool, specify the disk pool device name as the first part of the integrated file system path name. The independent disk pool must be varied on before the virtual tape volumes are usable.
Image files *ALWSAV attributes
When the image catalog is in ready status, all of the image catalog's images have an *ALWSAV attribute value of *NO with the CHGATR command. This does not allow the images to be saved by the Save Object (SAV) command or the QsrSave API. When the image catalog is not in ready status, all of the image catalog's images have an *ALWSAV attribute value of *YES. This allows the images to be saved.
The CHGATR command would be used to change the allow save attribute of the virtual volumes in the integrated file system.
  • CHGATR OBJ('/tape/catalog1') ATR(*ALWSAV) VALUE(*NO)