Reclaiming storage space

You can reclaim space occupied by the logical volumes of a server by deleting the logical volume and its associated physical volumes and disks.
Note: Ensure that a logical volume is no longer in use before reclaiming its storage space.
The underlying physical volumes and disks need not be deleted if they can be used by the same server to store other data. However, they must be deleted if you plan to use the space for another server.

You must delete logical volumes, physical volumes, and disks in that order. The following list summarizes the steps needed to reclaim storage space:

  1. Remove all mirrors of the volume.
  2. Restart the server in administrative mode.
  3. Delete the logical volume.
  4. Delete the physical volume or volumes.
  5. Delete the disk or disks (if no other physical volume is stored on the disk).
  6. Windows Only. Delete the operating system files used as disks.
Note: If AIX® operating system logical volumes are used, see Reclaiming storage space (AIX logical volumes) for instructions.

The examples in this procedure reclaim the space occupied by the logical volume sfslvol1. Assume that the logical volume sfslvol1 is backed by two physical volumes: the original physical volume, sfspvol1, and a mirror, sfspvol1.mirr. Each physical volume resides on its own Open Systems disk partition, for example, sfspvol1 on /dev/rsd0f and sfspvol1.mirr on /dev/rse0f.

Perform the following steps to reclaim storage space:

  1. Remove all mirrors of the backing physical volume using the tkadmin remove mirror command. The syntax of the tkadmin remove mirror command is
    tkadmin remove mirror -server server_name logical_volume_name
    physical_volume_name

    You must specify the name of the logical volume for the logical_volume_name argument and the name of the physical volume for the physical_volume_name argument. You can determine which physical volume and mirrors back a logical volume by using the tkadmin query lvol command.

    For example, enter the following command to remove a mirror named sfspvol1.mirr from a logical volume named sfslvol1:

    %  tkadmin remove mirror sfslvol1 sfspvol1.mirr
  2. Restart the server in administrative mode. See Restarting a server in administrative mode for instructions.
  3. Use the tkadmin delete lvol command to delete the logical volume. Deleting the logical volume removes the mapping of a physical volume to the logical volume it backs. You must delete a logical volume before you delete its backing physical volumes. The command syntax is
    tkadmin delete lvol -server server_name logical_volume_name

    You must specify the name of the logical volume for the logical_volume_name argument. For example, enter the following command to delete a logical volume named sfslvol1:

    %  tkadmin delete lvol sfslvol1
  4. Use the tkadmin delete pvol command to delete the physical volume. You must delete a physical volume before you delete, that is, uninitialize, the disks that back it. The command syntax is
    tkadmin delete pvol -server server_name physical_volume_name

    You must specify the name of the physical volume to be deleted as the physical_volume_name argument. Be sure to delete all physical volumes, including physical volumes that back mirrors. For example, enter the following command to delete a physical volume named sfspvol1:

    %  tkadmin delete pvol sfspvol1
  5. Use the tkadmin delete disk command to delete each disk that backs a physical volume. Deleting a disk marks the disk as uninitialized. The command syntax is
    tkadmin delete disk -server server_name disk_name

    You must specify the name of the disk as the disk_name argument. Any attempt to delete a disk that still stores a physical volume fails. Note that some physical volumes are stored on multiple disks and that a single disk can hold multiple physical volumes or portions of physical volumes.

    In this example, each physical volume resides on its own disk partition, for example, sfspvol1 on /dev/rsd0f and sfspvol1.mirr on /dev/rse0f. You must delete both disk partitions.

    On Open Systems. For example, enter the following command to delete a disk named /dev/rsd0f:

    %  tkadmin delete disk /dev/rsd0f

    On Windows. For example, enter the following command to delete a disk named D:\rqs1data:

    C:\> tkadmin delete disk D:\rqs1data
  6. Windows Only. Delete the operating system file serving as a disk. That is, the file initially created by using the fileVol program or your own program. Use any standard file deletion mechanism to delete the file.
Note: A server retains the name of a logical volume even after the volume is deleted. Further, all volumes of a Toolkit server must have unique names. If you want to reuse the name of a deleted logical volume, you must rename it; change the stored name to a different name. Then the original volume name can be reused; the server no longer retains information about this volume name.