dsmDeleteFS

The dsmDeleteFS function call deletes a file space from storage. To delete a file space, you must have the appropriate permissions that your IBM® Storage Protect administrator gave you. To determine whether you have the necessary permissions, call dsmQuerySessInfo. This function call returns a data structure of type ApiSessInfo, that includes two fields, archDel and backDel.

Note:
  • On a UNIX or Linux® operating system, only a root user or an authorized user can delete a file space.
  • If the file space that you need to delete contains backup versions, you must have backup delete authority (backDel = BACKDEL_YES). If the file space contains archive copies, you must have archive delete authority (archDel = ARCHDEL_YES). If the file space contains both backup versions and archive copies, you must have both types of delete authority.
  • When using an archive manager server, a file space cannot actually be removed. This function call returns rc=0 even though the file space was not actually deleted. The only way to verify that the file space has been deleted is to issue a filespace query to the server.
  • The IBM Storage Protect server delete file-space function is a background process. If errors other than those detected before passing a return code happen, they are recorded in the IBM Storage Protect server log.

Syntax

dsInt16_t dsmDeleteFS  (dsUint32_t          dsmHandle,
   char           *fsName,
   unsigned char   repository);

Parameters

dsUint32_t dsmHandle (I)
The handle that associates this call with a previous dsmInitEx call.
char *fsName (I)
A pointer to the file space name to delete. The wildcard character is not permitted.
unsigned char repository (I)
Indicates whether the file space to delete is a backup repository, archive repository, or both. The possible values for this field include:
DSM_ARCHIVE_REP     /* archive repository   */
DSM_BACKUP_REP      /* backup repository    */
DSM_REPOS_ALL       /* all repository types */

Return codes

The return code numbers are provided in parentheses ( ).

Table 1. Return codes for dsmDeleteFS
Return code Explanation
DSM_RC_ABORT_NOT_AUTHORIZED (27) You do not have the necessary authority to delete the file space.
DSM_RC_INVALID_REPOS (2015) Invalid value for repository.
DSM_RC_FSNAME_NOTFOUND (2060) File space name not found.
DSM_RC_NEED_ROOT (2300) API caller must be a root user.